patman: Use the full commit hash for 'git checkout'
authorSimon Glass <sjg@chromium.org>
Wed, 15 Oct 2014 08:27:00 +0000 (02:27 -0600)
committerSimon Glass <sjg@chromium.org>
Thu, 27 Nov 2014 03:25:39 +0000 (20:25 -0700)
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>
tools/buildman/control.py
tools/patman/patchstream.py

index 8b8c826002f51aca985e6d2b493e0c6f4692363f..96ba2d940ef6c702993291f80c55c14cb8f8118b 100644 (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:
index d630157f8f70f640858a28d66e0f00b61d74e82a..da0488337b29a5fd4db542b58892a14c4e637ee9 100644 (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: