Module ImportFrom alias alias alias alias alias alias ImportFrom alias Import alias Import alias ImportFrom alias ImportFrom alias alias ImportFrom alias alias alias ImportFrom alias alias alias alias ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias Assign NameStore BinOpBitOr NameLoad NameLoad Assign NameStore UnaryOpInvert NameLoad Assign NameStore TupleLoad Str Str Str Str Str Str Str Str FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr body Return Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad AttributeLoad NameLoad attr attr keyword CompareEq AttributeLoad NameLoad attr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr If CompareNotEq AttributeLoad NameLoad attr Num body Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Raise Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If Call NameLoad NameLoad body Return NameLoad If BoolOpOr Call NameLoad NameLoad CompareEq Call NameLoad NameLoad NameLoad body Return NameLoad Return BinOpBitOr BinOpBitOr NameLoad Num BinOpBitAnd NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore Num Expr Call NameLoad Str Expr Call NameLoad Call NameLoad Str NameLoad Call NameLoad NameLoad For NameStore NameLoad body Assign NameStore Call NameLoad Expr Call NameLoad SubscriptLoad NameLoad Index Num Expr Call NameLoad SubscriptLoad NameLoad Index Num Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore Call NameLoad NameLoad keyword NameLoad Assign NameStore BinOpBitAnd Call NameLoad NameLoad NameLoad Assert CompareEq NameLoad Call NameLoad NameLoad BinOpMod Str SubscriptLoad NameLoad Index Num Assign NameStore BinOpBitOr NameLoad BinOpBitAnd SubscriptLoad NameLoad Index Num NameLoad Expr Call NameLoad Call NameLoad Str SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num NameLoad Expr Call NameLoad NameLoad Assign NameStore BinOpBitAnd BinOpAdd BinOpSub Call NameLoad NameLoad Num UnaryOpInvert Num Expr Call NameLoad BinOpMult Str BinOpSub BinOpAdd NameLoad NameLoad Call NameLoad If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Num If CompareNotEq NameLoad Str body Raise Call NameLoad BinOpMod Str NameLoad Assign TupleStore NameStore NameStore Call NameLoad Str Call AttributeLoad NameLoad attr BinOpMult Num Num Assert CompareIn NameLoad TupleLoad Num Num Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args defaults vararg body Expr Str If CompareEq Call NameLoad NameLoad Num body Return TupleLoad AttributeLoad SubscriptLoad NameLoad Index Num attr AttributeLoad SubscriptLoad NameLoad Index Num attr orelse Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call NameLoad NameLoad Assign NameStore Num Assign NameStore Call NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr While CompareLt NameLoad NameLoad body Assign NameStore Call NameLoad Assign NameStore SubscriptLoad Call NameLoad Str Call NameLoad Num Index Num Assign NameStore SubscriptLoad Call NameLoad Str Call NameLoad Num Index Num Assign TupleStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore Call NameLoad Str Call NameLoad BinOpAdd BinOpAdd Num BinOpMult Num Num Num Assign NameStore BinOpBitAnd NameLoad NameLoad Assign NameStore Call AttributeLoad Call NameLoad NameLoad attr NameLoad Assign NameStore BinOpBitAnd BinOpAdd BinOpSub Call NameLoad NameLoad Num UnaryOpInvert Num Expr Call NameLoad BinOpSub BinOpAdd NameLoad NameLoad Call NameLoad Assign NameStore Call NameLoad TupleLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Assign SubscriptStore NameLoad Index TupleLoad NameLoad AttributeLoad NameLoad attr NameLoad AugAssignAdd NameStore Num Assign NameStore Call AttributeLoad NameLoad attr UnaryOpInvert Num Assert CompareGt Call NameLoad NameLoad Num BinOpMod Str Call NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Slice Num Assign NameStore SubscriptLoad NameLoad Slice Num Return TupleLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num body Expr Str Assign NameStore Call NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr While CompareLt NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad If CompareNotEq AttributeLoad NameLoad attr Num body Raise Call NameLoad NameLoad AugAssignAdd NameStore Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad If CompareEq NameLoad Num body Expr Call NameLoad TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Slice NameLoad orelse Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Slice NameLoad NameLoad Assign NameStore NameLoad While CompareLt NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad If BoolOpOr CompareEq NameLoad Num CompareNotEq SubscriptLoad AttributeLoad NameLoad attr Slice NameLoad NameLoad NameLoad body Break AugAssignAdd NameStore Num Assign TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad Call NameLoad BinOpSub NameLoad Num NameLoad BinOpAdd NameLoad Num Expr Call NameLoad TupleLoad NameLoad NameLoad NameLoad Assign NameStore NameLoad Assign NameStore Call NameLoad Expr Call NameLoad NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad NameLoad Call NameLoad Call AttributeLoad NameLoad attr NameLoad Return TupleLoad AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call NameLoad TupleLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num BinOpLShift NameLoad NameLoad SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore AttributeLoad NameLoad attr If CompareIn Call NameLoad NameLoad TupleLoad Num Num body For NameStore Call NameLoad NameLoad SubscriptLoad NameLoad Index Num Str body Expr Call NameLoad Call NameLoad NameLoad Num Return NameLoad If CompareGt Call NameLoad NameLoad Num body Raise Call NameLoad BinOpMod Str Call NameLoad NameLoad For TupleStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad Str body If CompareIsNot NameLoad NameLoad body If CompareIsNot NameLoad NameLoad body If CompareIsNot NameLoad NameLoad body If BoolOpOr BoolOpAnd CompareNotEq SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num CompareNotEq SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num CompareNotEq SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num BoolOpAnd CompareNotEq SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num CompareNotEq SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num CompareNotEq SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num body Expr Call NameLoad Call NameLoad NameLoad Num Expr Call NameLoad Call NameLoad NameLoad Num Expr Call NameLoad Call NameLoad NameLoad Num orelse If BoolOpOr CompareNotEq SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num CompareNotEq SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num body Expr Call NameLoad Call NameLoad NameLoad Num orelse Expr Call NameLoad Call NameLoad NameLoad Num orelse If BoolOpOr CompareNotEq SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num CompareNotEq SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num body Expr Call NameLoad Call NameLoad NameLoad Num Expr Call NameLoad Call NameLoad NameLoad Num orelse If CompareIs NameLoad NameLoad body Pass orelse If BoolOpOr CompareNotEq SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num CompareNotEq SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num body Expr Call NameLoad Call NameLoad NameLoad Num Expr Call NameLoad Call NameLoad NameLoad Num orelse If CompareIs NameLoad NameLoad body Expr Call NameLoad Call NameLoad NameLoad Num orelse If CompareIs NameLoad NameLoad body Expr Call NameLoad Call NameLoad NameLoad Num orelse If BoolOpOr CompareNotEq SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num CompareNotEq SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num body Expr Call NameLoad Call NameLoad NameLoad Num Expr Call NameLoad Call NameLoad NameLoad Num orelse Expr Call NameLoad Call NameLoad NameLoad Num Return NameLoad decorator_list
N/A stat S_IFDIR S_IFLNK S_ISLNK S_ISDIR S_IFMT S_IFREG io BytesIO N/A os N/A subprocess git.util IndexFileSHA1Writer git.exc UnmergedEntriesError HookExecutionError git.objects.fun tree_to_stream traverse_tree_recursive traverse_trees_recursive typ BaseIndexEntry IndexEntry CE_NAMEMASK CE_STAGESHIFT util pack unpack gitdb.base IStream gitdb.typ str_tree_type git.compat defenc force_text force_bytes N/A S_IFGITLINK N/A S_IFLNK S_IFDIR N/A CE_NAMEMASK_INV N/A CE_NAMEMASK N/A __all__ N/A write_cache read_cache write_tree_from_cache entry_key stat_mode_to_index_mode S_IFGITLINK run_commit_hook hook_path hook_path N/A N/A name git_dir N/A N/A N/A :return: path to the given named hook in the given git repository directory N/A N/A N/A N/A os path join git_dir hooks name N/A run_commit_hook N/A N/A name index N/A N/A N/A Run the commit hook of the given name. Silently ignores hooks that do not exist.
    :param name: name of hook, like 'pre-commit'
    :param index: IndexFile instance
    :raises HookExecutionError:  N/A hp N/A hook_path name N/A N/A index repo git_dir N/A N/A N/A N/A os access hp N/A os X_OK N/A N/A N/A env N/A N/A N/A os environ copy N/A N/A env N/A GIT_INDEX_FILE N/A index path N/A N/A env N/A GIT_EDITOR : N/A cmd N/A N/A subprocess Popen hp env env stdout N/A subprocess PIPE stderr N/A subprocess PIPE cwd N/A N/A index repo working_dir close_fds N/A N/A os name posix N/A N/A stdout stderr N/A N/A cmd communicate N/A N/A N/A N/A cmd stdout close N/A N/A N/A N/A cmd stderr close N/A N/A N/A cmd returncode 0 N/A N/A stdout N/A force_text stdout defenc N/A stderr N/A force_text stderr defenc N/A N/A HookExecutionError hp N/A cmd returncode stdout stderr N/A stat_mode_to_index_mode N/A N/A mode N/A N/A N/A Convert the given mode from a stat call to the corresponding index mode
    and return it N/A N/A S_ISLNK mode N/A N/A S_IFLNK N/A N/A N/A S_ISDIR mode N/A N/A S_IFMT mode S_IFGITLINK N/A N/A S_IFGITLINK N/A N/A N/A S_IFREG 420 N/A mode 64 N/A write_cache N/A N/A entries stream extension_data ShaStreamCls N/A None IndexFileSHA1Writer N/A N/A Write the cache represented by entries to a stream

    :param entries: **sorted** list of entries
    :param stream: stream to wrap into the AdapterStreamCls - it is used for
        final output.

    :param ShaStreamCls: Type to use when writing to the stream. It produces a sha
        while writing to it, before the data is passed on to the wrapped stream

    :param extension_data: any kind of data to write as a trailer, it must begin
        a 4 byte identifier, followed by its size ( 4 bytes ) N/A stream N/A ShaStreamCls stream N/A tell N/A stream tell N/A write N/A stream write N/A version 2 N/A N/A write DIRC N/A N/A write N/A pack >LL version N/A len entries N/A entry entries N/A N/A beginoffset N/A tell N/A N/A write N/A entry N/A 4 N/A N/A write N/A entry N/A 5 N/A path N/A entry N/A 3 N/A path N/A force_bytes path encoding defenc N/A plen N/A N/A len path CE_NAMEMASK N/A N/A plen N/A len path N/A Path %s too long to fit into index N/A entry N/A 3 N/A flags N/A plen N/A N/A entry N/A 2 CE_NAMEMASK_INV N/A N/A write N/A pack >LLLLLL20sH N/A entry N/A 6 N/A entry N/A 7 N/A entry N/A 0 N/A entry N/A 8 N/A entry N/A 9 N/A entry N/A 10 N/A entry N/A 1 flags N/A N/A write path N/A real_size N/A N/A N/A N/A tell beginoffset 8 N/A 7 N/A N/A write N/A N/A N/A beginoffset real_size N/A tell N/A N/A extension_data None N/A N/A N/A N/A stream write extension_data N/A N/A N/A stream write_sha N/A read_header N/A N/A stream N/A N/A N/A Return tuple(version_long, num_entries) from the given stream N/A type_id N/A N/A stream read 4 N/A N/A type_id DIRC N/A N/A N/A AssertionError N/A Invalid index file header: %r type_id N/A N/A version num_entries N/A unpack >LL N/A N/A stream read N/A 4 2 N/A N/A version N/A 1 2 N/A N/A version num_entries N/A entry_key N/A N/A N/A entry N/A N/A :return: Key suitable to be used for the index.entries dictionary
    :param entry: One instance of type BaseIndexEntry or the path and the stage N/A N/A N/A len entry 1 N/A N/A N/A N/A N/A entry N/A 0 path N/A N/A entry N/A 0 stage N/A N/A N/A tuple entry N/A read_cache N/A N/A stream N/A N/A N/A Read a cache file from the given stream
    :return: tuple(version, entries_dict, extension_data, content_sha)
    * version is the integer version number
    * entries dict is a dictionary which maps IndexEntry instances to a path at a stage
    * extension_data is '' or 4 bytes of type + 4 bytes of size + size bytes
    * content_sha is a 20 byte sha on all cache file contents N/A N/A version num_entries N/A read_header stream N/A count 0 N/A entries N/A dict N/A read N/A stream read N/A tell N/A stream tell N/A N/A count num_entries N/A N/A beginoffset N/A tell N/A ctime N/A N/A unpack >8s N/A read 8 N/A 0 N/A mtime N/A N/A unpack >8s N/A read 8 N/A 0 N/A N/A dev ino mode uid gid size sha flags N/A unpack >LLLLLL20sH N/A read N/A N/A 20 N/A 4 6 2 N/A path_size N/A flags CE_NAMEMASK N/A path N/A N/A N/A read path_size decode defenc N/A real_size N/A N/A N/A N/A tell beginoffset 8 N/A 7 N/A N/A read N/A N/A beginoffset real_size N/A tell N/A entry N/A IndexEntry N/A mode sha flags path ctime mtime dev ino uid gid size N/A N/A entries N/A N/A path N/A entry stage entry N/A count 1 N/A extension_data N/A N/A stream read N/A 0 N/A N/A N/A len extension_data 19 N/A Index Footer was not at least a sha on content as it was only %i bytes in size N/A len extension_data N/A content_sha N/A extension_data N/A -20 N/A extension_data N/A extension_data N/A -20 N/A N/A version entries extension_data content_sha N/A write_tree_from_cache N/A N/A entries odb sl si N/A 0 N/A N/A Create a tree from the given sorted list of entries and put the respective
    trees into the given object database

    :param entries: **sorted** list of IndexEntries
    :param odb: object database to store the trees in
    :param si: start index at which we should start creating subtrees
    :param sl: slice indicating the range we should process on the entries list
    :return: tuple(binsha, list(tree_entry, ...)) a tuple of a sha and a list of
        tree entries being a tuple of hexsha, mode, name N/A tree_items N/A list N/A tree_items_append N/A tree_items append N/A ci N/A sl start N/A end N/A sl stop N/A N/A ci end N/A N/A entry N/A entries N/A ci N/A N/A N/A entry stage 0 N/A N/A N/A UnmergedEntriesError entry N/A ci 1 N/A rbound N/A N/A N/A entry path find / si N/A N/A rbound -1 N/A N/A N/A tree_items_append N/A N/A entry binsha N/A entry mode N/A N/A entry path N/A si N/A N/A base N/A N/A entry path N/A si rbound N/A xi ci N/A N/A xi end N/A N/A oentry N/A entries N/A xi N/A orbound N/A N/A N/A oentry path find / si N/A N/A N/A orbound -1 N/A N/A N/A oentry path N/A si orbound base N/A N/A N/A xi 1 N/A N/A sha tree_entry_list N/A write_tree_from_cache entries odb N/A slice N/A ci 1 xi N/A rbound 1 N/A N/A tree_items_append N/A sha S_IFDIR base N/A ci xi N/A sio N/A BytesIO N/A N/A tree_to_stream tree_items N/A sio write N/A N/A N/A sio seek 0 N/A istream N/A N/A odb store N/A IStream str_tree_type N/A len N/A N/A sio getvalue sio N/A N/A N/A istream binsha tree_items N/A _tree_entry_to_baseindexentry N/A N/A tree_entry stage N/A N/A N/A N/A BaseIndexEntry N/A N/A tree_entry N/A 1 N/A tree_entry N/A 0 N/A stage CE_STAGESHIFT N/A tree_entry N/A 2 N/A aggressive_tree_merge N/A N/A odb tree_shas N/A N/A N/A 
    :return: list of BaseIndexEntries representing the aggressive merge of the given
        trees. All valid entries are on stage 0, whereas the conflicting ones are left
        on stage 1, 2 or 3, whereas stage 1 corresponds to the common ancestor tree,
        2 to our tree and 3 to 'their' tree.
    :param tree_shas: 1, 2 or 3 trees as identified by their binary 20 byte shas
        If 1 or two, the entries will effectively correspond to the last given tree
        If 3 are given, a 3 way merge is performed N/A out N/A list N/A out_append N/A out append N/A N/A N/A len tree_shas N/A 1 2 N/A N/A entry N/A traverse_tree_recursive odb N/A tree_shas N/A -1 N/A N/A N/A out_append N/A _tree_entry_to_baseindexentry entry 0 N/A out N/A N/A N/A len tree_shas 3 N/A N/A N/A ValueError N/A Cannot handle %i trees at once N/A len tree_shas N/A N/A base ours theirs N/A traverse_trees_recursive odb tree_shas N/A N/A N/A base None N/A N/A N/A ours None N/A N/A N/A theirs None N/A N/A N/A N/A N/A N/A base N/A 0 N/A ours N/A 0 N/A N/A base N/A 0 N/A theirs N/A 0 N/A N/A ours N/A 0 N/A theirs N/A 0 N/A N/A N/A base N/A 1 N/A ours N/A 1 N/A N/A base N/A 1 N/A theirs N/A 1 N/A N/A ours N/A 1 N/A theirs N/A 1 N/A N/A N/A out_append N/A _tree_entry_to_baseindexentry base 1 N/A N/A out_append N/A _tree_entry_to_baseindexentry ours 2 N/A N/A out_append N/A _tree_entry_to_baseindexentry theirs 3 N/A N/A N/A N/A N/A base N/A 0 N/A ours N/A 0 N/A N/A base N/A 1 N/A ours N/A 1 N/A N/A N/A out_append N/A _tree_entry_to_baseindexentry ours 0 N/A N/A N/A out_append N/A _tree_entry_to_baseindexentry theirs 0 N/A N/A N/A N/A N/A ours N/A 0 N/A base N/A 0 N/A N/A ours N/A 1 N/A base N/A 1 N/A N/A N/A out_append N/A _tree_entry_to_baseindexentry base 1 N/A N/A out_append N/A _tree_entry_to_baseindexentry ours 2 N/A N/A N/A theirs None N/A N/A N/A N/A N/A N/A N/A theirs N/A 0 N/A base N/A 0 N/A N/A theirs N/A 1 N/A base N/A 1 N/A N/A N/A out_append N/A _tree_entry_to_baseindexentry base 1 N/A N/A out_append N/A _tree_entry_to_baseindexentry theirs 3 N/A N/A N/A ours None N/A N/A N/A out_append N/A _tree_entry_to_baseindexentry theirs 0 N/A N/A N/A theirs None N/A N/A N/A out_append N/A _tree_entry_to_baseindexentry ours 0 N/A N/A N/A N/A N/A ours N/A 0 N/A theirs N/A 0 N/A N/A ours N/A 1 N/A theirs N/A 1 N/A N/A N/A out_append N/A _tree_entry_to_baseindexentry ours 2 N/A N/A out_append N/A _tree_entry_to_baseindexentry theirs 3 N/A N/A N/A out_append N/A _tree_entry_to_baseindexentry ours 0 N/A out N/A