summaryrefslogtreecommitdiff
path: root/morphlib/gitindex_tests.py
Commit message (Collapse)AuthorAgeFilesLines
* gitindex: Add GitIndex.write_tree()Richard Maw2013-11-221-0/+5
| | | | | This generates a tree object from the index. This can then be used to create a commit.
* gitindex: Add GitIndex.add_files_from_working_tree()Richard Maw2013-11-221-0/+12
| | | | | | | | | | This is like GitIndex.add_files_from_index_info, but uses the working tree and a list of paths. This is more convenient when the changes exist in the working tree. The comment describes its relationship with GitIndex.add_files_from_index_info, but it is faster, since it calls out to `git add` rather than calling out to `git hash-object` for every file.
* gitindex: Add GitIndex.add_files_from_index_info()Richard Maw2013-11-221-0/+10
| | | | | | This is used to add files directly to the index, without touching the working tree. This is used in the build without commit code for creating new morphologies pointing to different branches.
* gitindex: Add GitIndex.set_to_tree(treeish) methodRichard Maw2013-11-221-0/+9
| | | | | | | This is used to set the state of the index to that of a previously known commit. This is needed for the build without commit logic, so that commits generated are that of the last commit in the repository and anything uncommitted.
* GitDir: Add GitIndex classRichard Maw2013-11-221-0/+56
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.