git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] checkout -p: handle tree arguments correctly again

From
Denton Liu <liu.denton@gmail.com>
Date
Dec 19, 2020, 15:02 UTC
Message-ID
<X94WHmY3Cd30wqan@generichostname>
In-Reply-To
<pull.819.git.1608389760050.gitgitgadget@gmail.com>
Hi Dscho,
On Sat, Dec 19, 2020 at 02:55:59PM +0000, Johannes Schindelin via GitGitGadget wrote:
Show 11 quoted lines
> 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>
Previous: Johannes Schindelin via GitGitGadgetNext: Junio C Hamano
Message 2 of 4 in “checkout -p: handle tree arguments correctly again”
  1. checkout -p: handle tree arguments correctly againJohannes Schindelin via GitGitGadget, Dec 19, 2020
  2. Denton LiuDec 19, 2020
  3. Junio C HamanoDec 19, 2020
  4. Junio C HamanoDec 19, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.