All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: aeron-gh <agab0323@gmail.com>
Cc: git@vger.kernel.org,  Usman Akinyemi <usmanakinyemi202@gmail.com>,
	Victoria Dye <vdye@github.com>,
	 Meet Soni <meetsoni3017@gmail.com>
Subject: Re: [PATCH] for-each-ref: avoid segfault on --no-format
Date: Fri, 13 Nov 2026 15:11:36 -0800	[thread overview]
Message-ID: <xmqqse148gyf.fsf@gitster.g> (raw)
In-Reply-To: <xmqqjymg9ycq.fsf@gitster.g> (Junio C. Hamano's message of "Fri, 13 Nov 2026 14:10:29 -0800")

Junio C Hamano <gitster@pobox.com> writes:

>> Marking the option with PARSE_OPT_NONEG would also stop the crash,
>> but then "--no-format" would work for "git branch" and "git tag"
>> and be an error here.
>
> Shouldn't "git branch --no-format" also error out?

Hmph, "git branch --no-format" seems to take it as an instruction to
revert to the default format.  Making "--no-format" mean the same
thing in "for-each-ref" may make sense.

The implementation of "git branch" side is quite clean; if
format.format has a value, use it, or fill it with default.  Perhaps
mimicking it would give us the right behaviour?  I didn't check.

      reply	other threads:[~2026-11-13 23:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-13 16:14 [PATCH] for-each-ref: avoid segfault on --no-format aeron-gh
2026-11-13 22:10 ` Junio C Hamano
2026-11-13 23:11   ` Junio C Hamano [this message]

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=xmqqse148gyf.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=agab0323@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=meetsoni3017@gmail.com \
    --cc=usmanakinyemi202@gmail.com \
    --cc=vdye@github.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.