git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] gitk: use the 'reference' format for the commit reference

From
Beat Bolli <dev+git@drbeat.li>
Date
Aug 27, 2020, 16:12 UTC
Message-ID
<20200827161224.824365-1-dev+git@drbeat.li>

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.

Signed-off-by: Beat Bolli <dev+git@drbeat.li>
---
 gitk | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/gitk b/gitk
index da84e22..b26996c 100755
--- a/gitk
+++ b/gitk
@@ -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
     }
-- 
2.26.0.277.gb8618d28a9
Next: Eric Sunshine
Message 1 of 3 in “gitk: use the 'reference' format for the commit reference”
  1. gitk: use the 'reference' format for the commit referenceBeat Bolli, Aug 27, 2020
  2. Eric SunshineAug 27, 2020
  3. Beat BolliAug 27, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.