diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-02-13 19:48:40 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-02-13 19:48:40 +0100 |
commit | 15ee0ac0d56a5fb5ba13fae4288621ddd2185f17 (patch) | |
tree | acdf245dfc10162680e16885f182f6b4a3c81b7e /lib/git/index.py | |
parent | 400d728c99ddeae73c608e244bd301248b5467fc (diff) | |
download | gitpython-15ee0ac0d56a5fb5ba13fae4288621ddd2185f17.tar.gz |
IndexFile: unmerged_blobs lists are now sorted
Repo.init: fixed incorrect use of the path which was to optionally specify where to initialize the repository. Update test as well
Diffstat (limited to 'lib/git/index.py')
-rw-r--r-- | lib/git/index.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/git/index.py b/lib/git/index.py index df633ccd..96d42eaf 100644 --- a/lib/git/index.py +++ b/lib/git/index.py @@ -672,7 +672,7 @@ class IndexFile(LazyMixin, diff.Diffable): Returns Iterator yielding dict(path : list( tuple( stage, Blob, ...))), being a dictionary associating a path in the index with a list containing - stage/blob pairs + sorted stage/blob pairs Note: Blobs that have been removed in one side simply do not exist in the @@ -684,7 +684,8 @@ class IndexFile(LazyMixin, diff.Diffable): for stage, blob in self.iter_blobs(is_unmerged_blob): path_map.setdefault(blob.path, list()).append((stage, blob)) # END for each unmerged blob - + for l in path_map.itervalues(): + l.sort() return path_map @classmethod @@ -724,7 +725,7 @@ class IndexFile(LazyMixin, diff.Diffable): for blob in iter_blobs: stage_null_key = (blob.path, 0) if stage_null_key in self.entries: - raise ValueError( "Blob %r already at stage 0" % blob ) + raise ValueError( "Path %r already exists at stage 0" % blob.path ) # END assert blob is not stage 0 already # delete all possible stages |