From: Junio C Hamano <gitster@pobox.com>
To: "gdd via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Phillip Wood" <phillip.wood123@gmail.com>,
gdd <gregory.david@p1sec.com>
Subject: Re: [PATCH] show-branch: fix SEGFAULT on both --current & --reflog
Date: Fri, 22 Apr 2022 11:43:51 -0700 [thread overview]
Message-ID: <xmqq4k2l9cwo.fsf@gitster.g> (raw)
In-Reply-To: <xmqqv8v19ght.fsf@gitster.g> (Junio C. Hamano's message of "Fri, 22 Apr 2022 10:26:22 -0700")
Junio C Hamano <gitster@pobox.com> writes:
>> It seems that it has been introduced in: Commit 1aa68d6735
>> (show-branch: --current includes the current branch., 2006-01-11)
>
> Yes, the commit should have noticed the invalid combination of
> options were given and errored out. Since omission of such a check
> lead to a segfaulting bug without producing any useful output, it
> is safe to make it an error to give these options at the same time.
Actually, no, the commit couldn't have been the culprit. Back when
1aa58d6735 was written, "--reflog" option did not even exist.
If we want to find a commit to blame, it is 76a44c5c (show-branch
--reflog: show the reflog message at the top., 2007-01-19). That
commit should have caught invalid combination. It did attempt to
catch some invalid combinations (like --more in the reflog mode),
but apparently forgot to notice that --current does not make sense
to be used in the new mode it was adding.
Thanks.
next prev parent reply other threads:[~2022-04-22 20:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-22 13:38 [PATCH] show-branch: fix SEGFAULT on both --current & --reflog gdd via GitGitGadget
2022-04-22 17:26 ` Junio C Hamano
2022-04-22 18:43 ` Junio C Hamano [this message]
2022-04-25 7:33 ` Gregory David
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=xmqq4k2l9cwo.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gregory.david@p1sec.com \
--cc=phillip.wood123@gmail.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.