patman: Use the full commit hash for 'git checkout'

Even with the initial 8 characeters of the hash we will sometimes get a
collision. Use the full hash.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass 2014-10-15 02:27:00 -06:00
parent ce267335c3
commit 0b5b409acc
2 changed files with 2 additions and 3 deletions

View File

@ -70,7 +70,7 @@ def ShowActions(series, why_selected, boards_selected, builder, options):
if commits:
for upto in range(0, len(series.commits), options.step):
commit = series.commits[upto]
print ' ', col.Color(col.YELLOW, commit.hash, bright=False),
print ' ', col.Color(col.YELLOW, commit.hash[:8], bright=False),
print commit.subject
print
for arg in why_selected:

View File

@ -248,8 +248,7 @@ class PatchStream:
# Detect the start of a new commit
elif commit_match:
self.CloseCommit()
# TODO: We should store the whole hash, and just display a subset
self.commit = commit.Commit(commit_match.group(1)[:8])
self.commit = commit.Commit(commit_match.group(1))
# Detect tags in the commit message
elif tag_match: