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

3 messages from 2020-08-27 to 2020-08-27. Participants: Beat Bolli, Eric Sunshine.
Thread: https://gitlist.dev/t/54143

## Beat Bolli, 2020-08-27 16:12

Subject: [PATCH] gitk: use the 'reference' format for the commit reference
Message-ID: <20200827161224.824365-1-dev+git@drbeat.li>
URL: https://gitlist.dev/e/20200827161224.824365-1-dev%2Bgit%40drbeat.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


```

## Eric Sunshine, 2020-08-27 16:26

Subject: Re: [PATCH] gitk: use the 'reference' format for the commit reference
Message-ID: <CAPig+cRZEgu4GfMGSWQbs4cV9OGT9z7gKh8v8S+_sWmKFJd4Sg@mail.gmail.com>
URL: https://gitlist.dev/e/CAPig%2BcRZEgu4GfMGSWQbs4cV9OGT9z7gKh8v8S%2B_sWmKFJd4Sg%40mail.gmail.com
In-Reply-To: <20200827161224.824365-1-dev+git@drbeat.li>

```
On Thu, Aug 27, 2020 at 12:19 PM Beat Bolli <dev+git@drbeat.li> wrote:
> 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>

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

```

## Beat Bolli, 2020-08-27 20:35

Subject: Re: [PATCH] gitk: use the 'reference' format for the commit reference
Message-ID: <55bcebf4-5d5a-7133-35b8-c8780d7ee154@drbeat.li>
URL: https://gitlist.dev/e/55bcebf4-5d5a-7133-35b8-c8780d7ee154%40drbeat.li
In-Reply-To: <CAPig+cRZEgu4GfMGSWQbs4cV9OGT9z7gKh8v8S+_sWmKFJd4Sg@mail.gmail.com>

```
On 27.08.20 18:26, Eric Sunshine wrote:
> On Thu, Aug 27, 2020 at 12:19 PM Beat Bolli <dev+git@drbeat.li> wrote:
>> 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>
> 
> 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...

```
