git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Denton Liu <liu.denton@gmail.com>
Cc: Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org,
	Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: Re: [PATCH] checkout -p: handle tree arguments correctly again
Date: Sat, 19 Dec 2020 09:34:07 -0800	[thread overview]
Message-ID: <xmqqczz5punk.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <X94WHmY3Cd30wqan@generichostname> (Denton Liu's message of "Sat, 19 Dec 2020 07:02:54 -0800")

Denton Liu <liu.denton@gmail.com> writes:

> Hi Dscho,
>
> On Sat, Dec 19, 2020 at 02:55:59PM +0000, Johannes Schindelin via GitGitGadget wrote:
>> From: Johannes Schindelin <johannes.schindelin@gmx.de>
>> 
>> This fixes a segmentation fault.
>> 
>> The bug is caused by dereferencing `new_branch_info->commit` when it is
>> `NULL`, which is the case when the tree-ish argument is actually a tree,
>> not a commit-ish. This was introduced in 5602b500c3c (builtin/checkout:
>> fix `git checkout -p HEAD...` bug, 2020-10-07), where we tried to ensure
>> that the special tree-ish `HEAD...` is handled correctly.
>> 
>> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
>
> Argh, thanks for catching this. The patch looks obviously good.
>
> Since I'm the one who introduced the bug in the first place:
>
> 	Acked-by: Denton Liu <liu.denton@gmail.com>

The fix looks obviously correct to me.  Thanks, both.

Will queue for fast-tracking.


  reply	other threads:[~2020-12-19 17:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-19 14:55 [PATCH] checkout -p: handle tree arguments correctly again Johannes Schindelin via GitGitGadget
2020-12-19 15:02 ` Denton Liu
2020-12-19 17:34   ` Junio C Hamano [this message]
2020-12-19 17:40 ` Junio C Hamano

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=xmqqczz5punk.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=johannes.schindelin@gmx.de \
    --cc=liu.denton@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).