[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z2769aUCgYzyuKO4@lappy>
Date: Fri, 27 Dec 2024 14:07:33 -0500
From: Sasha Levin <sashal@...nel.org>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>, apw@...onical.com,
conor@...nel.org, corbet@....net, dwaipayanray1@...il.com,
gitster@...ox.com, horms@...nel.org, joe@...ches.com,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux@...mhuis.info, lukas.bulwahn@...il.com,
miguel.ojeda.sandonis@...il.com, niklas.soderlund@...igine.com,
willy@...radead.org, workflows@...r.kernel.org, kees@...nel.org
Subject: Re: [PATCH] git-disambiguate: disambiguate shorthand git ids
On Fri, Dec 27, 2024 at 07:33:30PM +0100, Geert Uytterhoeven wrote:
>Hi Sasha,
>
>On Fri, Dec 27, 2024 at 5:19 PM Sasha Levin <sashal@...nel.org> wrote:
>> No, it's not a problem. In my mind, I figured we could use shorter
>> hashes in mail message to make it easier to communicate.
>>
>> It doesn't have to be formal, but for example if we exchange mails about
>> an issue, and I end up referring to '1d1a ("arm64/sme: ...")' it both
>> makes the mail more readable, but still someone who doesn't have context
>> can still easily get to the commit I was referring to.
>
>Is that 1d1a commit something in your local tree? I don't seem to have it.
Heh, yeah, I wanted to pick a random commit with a longer subject line
and ended up landing on something local...
1d1a ("Merge tag 'mlx5-updates-2018-02-23' ...") works just as well :)
>A few other comments:
> 1. Please add support for --help. It took me a while to find out I
> need to call the script without parameters to get the help.
Ack
> 2. The passed commit-subject needs to be the full commit subject.
> It would be nice to support abbreviations, too.
It does it with ellipsis (I picked it up from sfr).
$ ./git-disambiguate.sh 1d1ab1ae6970 '("Merge tag 'mlx5-updates-2018-02-23' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux into k.o/wip/dl-for-next")'
1d1ab1ae69701d813993af40cf3ee39781ec4d6f
$ ./git-disambiguate.sh 1d1a '("Merge tag...")'
1d1ab1ae69701d813993af40cf3ee39781ec4d6f
Which was what I was trying to show off in the example above :)
>BTW, I am a heavy user of looking up commits (recent and old ;-)
>My .vimrc has:
>
> noremap ;gs "zyiw:exe "new \| setlocal buftype=nofile
>bufhidden=hide noswapfile syntax=git \| 0r ! git show ".@z."" \|
>:0<CR><CR>
>
>So I can move the cursor to a git commit ID, and type ";gs" to open
>the commit in a throw-away split window.
>Adding full support for commit-subjects may be challenging, especially
>if they are split across multiple lines (i.e. not Fixes: tags, but
>mentioned in the description).
Hyperlink git commits, eh? :)
--
Thanks,
Sasha
Powered by blists - more mailing lists