From: "Kristoffer Haugsbakk" <kristofferhaugsbakk@fastmail•com>
To: "Junio C Hamano" <gitster@pobox•com>
Cc: git@vger•kernel.org
Subject: Re: kh/name-rev-custom-format
Date: Thu, 26 Mar 2026 20:22:46 +0100 [thread overview]
Message-ID: <8c9dd9f9-4d41-4901-b1fb-080e4e73b40a@app.fastmail.com> (raw)
In-Reply-To: <xmqqtsu2pgu9.fsf@gitster.g>
On Thu, Mar 26, 2026, at 19:48, Junio C Hamano wrote:
> "Kristoffer Haugsbakk" <kristofferhaugsbakk@fastmail•com> writes:
>
>> On Wed, Mar 25, 2026, at 05:20, Junio C Hamano wrote:
>>> * kh/name-rev-custom-format (2026-03-20) 2 commits
>>> - name-rev: learn --format=<pretty>
>>> - name-rev: wrap both blocks in braces
>>>
>>> "git name-rev" learned to use custom format instead of the object
>>> name in an extended SHA-1 expression form.
>>>
>>> Comments?
>>> source: <V2_CV_name-rev_--format.51b@msgid•xyz>
>>
>> I’m working on rewriting the functionality in the form of a new builtin
>> git-format-rev(1) that lives in `builtin/name-rev.c`.
>
> By the way, why do we want yet another builtin in the first place?
I didn’t want another builtin. I looked at the options and didn’t find
anything that fit the described use case.
With git-name-rev(1) it looked like formatting options could crowd up
the place.
> Wouldn't this be done as a new option to "git log", for example?
Okay with me.
git-log(1) blocks until I have closed stdin and effectively dedups
the output.
git log --oneline --stdin --no-walk
HEAD
HEAD
HEAD
^D
<HEAD is listed one time>
So if an option could tweak it to instead (1) give one output per line
(like git-name-rev(1)) and (2) not deduplicate (well, follows from (1))
then the problem seems solved.
Thinking out loud here.
next prev parent reply other threads:[~2026-03-26 19:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-25 4:20 What's cooking in git.git (Mar 2026, #10) Junio C Hamano
2026-03-25 6:13 ` Jeff King
2026-03-25 8:33 ` Shreyansh Paliwal
2026-03-25 19:50 ` Junio C Hamano
2026-03-26 18:07 ` kh/name-rev-custom-format Kristoffer Haugsbakk
2026-03-26 18:48 ` kh/name-rev-custom-format Junio C Hamano
2026-03-26 19:22 ` Kristoffer Haugsbakk [this message]
2026-03-26 19:44 ` kh/name-rev-custom-format Junio C Hamano
-- strict thread matches above, loose matches on Subject: below --
2026-05-11 3:08 What's cooking in git.git (May 2026, #02) Junio C Hamano
2026-05-11 13:22 ` kh/name-rev-custom-format Kristoffer Haugsbakk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8c9dd9f9-4d41-4901-b1fb-080e4e73b40a@app.fastmail.com \
--to=kristofferhaugsbakk@fastmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=gitster@pobox$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox