Skip to contentSkip to conversation

gitk: use the 'reference' format for the commit reference

PATCH In review Beat Bolli 2 participants 3 messages Aug 27, 2020

lore
Share & tools
lore

Beat Bolli

author
#0 lore raw

PATCH 1/1 gitk: use the 'reference' format for the commit reference

Since 1f0fc1db85 (pretty: implement 'reference' format, 2019-11-19) in the main Git repository, there's an officially blessed format for commit references. Update gitk to also use this format.

---
 gitk | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
gitk +1 -2
index da84e22..b26996c 100755
@@ -9433,8 +9433,7 @@ proc mktaggo {} {
 proc copyreference {} {
     global rowmenuid autosellen
 
-    set format "%h (\"%s\", %ad)"
-    set cmd [list git show -s --pretty=format:$format --date=short]
+    set cmd [list git show -s --pretty=reference]
     if {$autosellen < 40} {
         lappend cmd --abbrev=$autosellen
     }
Signature · 1 line
2.26.0.277.gb8618d28a9
author
#2 lore raw
Quoted 9 lines · Eric Sunshine
Quoted 5 lines · Beat Bolli

Since 1f0fc1db85 (pretty: implement 'reference' format, 2019-11-19) in the main Git repository, there's an officially blessed format for commit references. Update gitk to also use this format.

See this thread:
https://lore.kernel.org/git/da9321b1bd56aafd16c8dcb99d5d628b79e2244e.1576100147.git.liu.denton@gmail.com/T/

Ooops, my memory is lacking!

Please ignore the noise...