diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2009-11-23 18:49:31 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2009-11-23 18:49:31 +0100 |
commit | 202216e2cdb50d0e704682c5f732dfb7c221fbbc (patch) | |
tree | 525311b1ddd95092da9ad1782de44187a1edb84d /lib/git/remote.py | |
parent | 1dd7d6468a54be56039b2e3a50bcf171d8e854ff (diff) | |
download | gitpython-202216e2cdb50d0e704682c5f732dfb7c221fbbc.tar.gz |
remote.fetch: fetchInfo would not provide old_commit information in case of fast_forwards although. Renamed cumbersome 'commit_before_forced_updated' attribute to 'old_commit' to be en par with PushInfo
Diffstat (limited to 'lib/git/remote.py')
-rw-r--r-- | lib/git/remote.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/git/remote.py b/lib/git/remote.py index b1c90bd5..56c6cf96 100644 --- a/lib/git/remote.py +++ b/lib/git/remote.py @@ -255,10 +255,10 @@ class FetchInfo(object): # i.e. info.flags & info.REJECTED # is 0 if ref is SymbolicReference info.note # additional notes given by git-fetch intended for the user - info.commit_before_forced_update # if info.flags & info.FORCED_UPDATE, + info.old_commit # if info.flags & info.FORCED_UPDATE|info.FAST_FORWARD, # field is set to the previous location of ref, otherwise None """ - __slots__ = ('ref','commit_before_forced_update', 'flags', 'note') + __slots__ = ('ref','old_commit', 'flags', 'note') NEW_TAG, NEW_HEAD, HEAD_UPTODATE, TAG_UPDATE, REJECTED, FORCED_UPDATE, \ FAST_FORWARD, ERROR = [ 1 << x for x in range(8) ] @@ -276,7 +276,7 @@ class FetchInfo(object): self.ref = ref self.flags = flags self.note = note - self.commit_before_forced_update = old_commit + self.old_commit = old_commit def __str__(self): return self.name @@ -369,8 +369,11 @@ class FetchInfo(object): flags |= cls.NEW_TAG if 'new branch' in operation: flags |= cls.NEW_HEAD - if '...' in operation: - old_commit = Commit(repo, operation.split('...')[0]) + if '...' in operation or '..' in operation: + split_token = '...' + if control_character == ' ': + split_token = split_token[:-1] + old_commit = Commit(repo, operation.split(split_token)[0]) # END handle refspec # END reference flag handling |