diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-06-24 16:02:28 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-06-24 18:08:40 +0200 |
commit | 55dcc17c331f580b3beeb4d5decf64d3baf94f2e (patch) | |
tree | 9b22eac76156f87e307ea33294791bc820fd3167 /lib/git/index/base.py | |
parent | 129f90aa8d83d9b250c87b0ba790605c4a2bb06a (diff) | |
download | gitpython-55dcc17c331f580b3beeb4d5decf64d3baf94f2e.tar.gz |
aggressive_tree_merge: fixed incorrect handling of one branch, it was just not implemented causing incorrect merge results. Added test to cover this issue
Diff: added NULL_BIN_SHA constant for completeness
Diffstat (limited to 'lib/git/index/base.py')
-rw-r--r-- | lib/git/index/base.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/git/index/base.py b/lib/git/index/base.py index 771f1710..7568b476 100644 --- a/lib/git/index/base.py +++ b/lib/git/index/base.py @@ -530,9 +530,7 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable): :raise ValueError: if there are no entries in the cache :raise UnmergedEntriesError: """ # we obtain no lock as we just flush our contents to disk as tree - if not self.entries: - raise ValueError("Cannot write empty index") - + # If we are a new index, the entries access will load our data accordingly mdb = MemoryDB() entries = self._entries_sorted() binsha, tree_items = write_tree_from_cache(entries, mdb, slice(0, len(entries))) @@ -892,7 +890,6 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable): return out - @default_index def commit(self, message, parent_commits=None, head=True): """ Commit the current default index file, creating a commit object. |