The GitDict object. Functions just like a dict, but it has a history and can be committed and merged.
These should be created with a DictRepository rather than instantiated directly.
Whether changes should be automatically committed.
Commit the dict to its repository.
Parameters: |
|
---|
v defaults to None.
The String key for this dict in its repository.
Try to merge another GitDict into this one. If possible, will fast-forward the merged dict; otherwise, will attempt to merge in the intervening changes.
Parameters: | |
---|---|
Returns: | True if the merge succeeded, False otherwise. |
Return type: | boolean |
If key is not found, d is returned if given, otherwise KeyError is raised
2-tuple; but raise KeyError if D is empty.
Update as if this were a regular dict.
The DictRepository object.
Parameters: | repo_or_path (string or pygit2.Repository) – The path to a repository, or an existing pygit2.Repository object. If it is a path that does not exist, a new bare git repository will be initialized there. If it is a path that does exist, then the directory will be used as a bare git repository. |
---|
Create a new GitDict
Parameters: |
|
---|---|
Returns: | the GitDict |
Return type: |
Obtain the GitDict for a key.
Parameters: |
|
---|---|
Returns: | the GitDict |
Return type: | |
Raises : | KeyError if there is no entry for key |
Commit a dict to this DictRepository. It is recommended that you use the GitDict commit method instead.
Parameters: |
|
---|---|
Returns: | The oid of the new commit. |
Return type: | 20 bytes |
Wrapper for a name and email to use when committing to git.
Parameters: |
|
---|
The author’s email.
The author’s name.
Generate a pygit2.Signature.
Parameters: |
|
---|---|
Returns: | a signature |
Return type: | pygit2.Signature |
A wrapper around json_diff’s dict comparisons.
Parameters: |
---|
A dict of appended keys and their values.
Determine whether this :class:`DictDiff <DictDiff>`s conflicts with another.
Parameters: | other (DictDiff) – The diff to compare. |
---|---|
Returns: | the conflicts |
Return type: | DictConflict |
A dict of removed keys and their values.
A dict of updated keys and their values.