pick-ui: show commit sha in the pick list
authorEric Engestrom <eric@engestrom.ch>
Wed, 11 Mar 2020 14:18:00 +0000 (15:18 +0100)
committerMarge Bot <eric+marge@anholt.net>
Tue, 21 Apr 2020 01:25:44 +0000 (01:25 +0000)
Useful to get more context when a manual merge is needed, for instance.

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4651>

bin/pick/ui.py

index d309c9db88385d0779921e1bc65c204060ef4f0c..2d7b510703f5bdac5788285ada5cdd0209f414ba 100644 (file)
@@ -67,7 +67,7 @@ class CommitWidget(urwid.Text):
     _selectable = True
 
     def __init__(self, ui: 'UI', commit: 'core.Commit'):
-        super().__init__(commit.description)
+        super().__init__(f'{commit.sha[:10]} {commit.description}')
         self.ui = ui
         self.commit = commit