summaryrefslogtreecommitdiff
path: root/morphlib/gitdir_tests.py
Commit message (Collapse)AuthorAgeFilesLines
* GitDir: Add remote.push(RefSpec...)Richard Maw2013-11-221-0/+131
| | | | | | | | Remotes have a push method, which takes multiple RefSpecs, runs git push using arguments derived from the set of refspecs, then returns the push's result. If it fails the push, it will return the result in the exception.
* GitDir: Add support for push urls in RemoteRichard Maw2013-11-221-12/+20
|
* GitDir: Split out Remote objectRichard Maw2013-11-221-10/+31
| | | | Operations on remotes are now accessed through this proxy object.
* GitDir: Add methods for ref managementRichard Maw2013-11-221-0/+78
|
* GitDir: Add GitDirectory.commit_tree() methodRichard Maw2013-11-221-0/+33
| | | | | This is used to create commit objects. This is used by build without commit to provide the behind-the-scenes history.
* GitDir: Add GitIndex classRichard Maw2013-11-221-5/+6
| | | | | | | | | | | | | | | This represents the state of the index of a GitDirectory. Methods that use the index are now used via the GitIndex class, rather than using the default index, as previously used when the methods were in GitDirectory. GitIndex may be constructed with an alternative path, which can be used to manipulate a git checkout without altering a developer's view of the repository i.e. The working tree and default index. This is needed for `morph build` and `morph deploy` to handle the build without commit logic.
* GitDir: add store_blob methodRichard Maw2013-11-221-0/+13
| | | | This is needed for making commits without touching the workspace.
* GitDir: Add resolve_ref_to_{commit,tree} methodsRichard Maw2013-11-221-0/+12
| | | | | | | | | | | | Some APIs should take SHA1 object IDs, there needs to be a way to get one from a ref. To handle this, we add APIs for getting either the commit or the tree pointed to by the ref. Commits are provided because we need to create commits from existing commits and update refs from existing values. Trees are provided because we need trees to create commits, and we can read trees into the index to eventually create another tree.
* gitdir: Add method for getting uncommitted changesRichard Maw2013-09-171-0/+5
| | | | | | | | | | get_uncommitted_changes() is needed for morph status to tell if git repositories have changes in them. _get_status() is private, since it does not currently have a user, the small amount of code in get_uncommitted_changes() wrapping _get_status() is in the GitDirectory class instead of the branch and merge plugin, since `morph build` will also need to know about uncommitted changes.
* gitdir: add HEAD property to find the current branchRichard Maw2013-09-171-0/+10
| | | | | This is needed for status to tell if a repo is checked out in an unexpected branch.
* gitdir: Add methods to inspect contentsRichard Maw2013-09-051-0/+73
| | | | | | This adds methods to list and read files. The difference between doing this to a commit and the currrent working tree is abstracted over by whether the passed ref is None or omitted.
* Add GitDirectory classLars Wirzenius2013-08-061-0/+66