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

Re: [PATCH 2/2] rebase -i: fix SIGSEGV when 'merge <branch>' fails

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Aug 16, 2018, 08:36 UTC
Message-ID
<nycvar.QRO.7.76.6.1808161036200.71@tvgsbejvaqbjf.bet>
In-Reply-To
<20180815093935.10222-3-phillip.wood@talktalk.net>
Hi Phillip,
On Wed, 15 Aug 2018, Phillip Wood wrote:
Show 19 quoted lines
> From: Phillip Wood <phillip.wood@dunelm.org.uk>
> 
> If a merge command in the todo list specifies just a branch to merge
> with no -C/-c argument then item->commit is NULL. This means that if
> there are merge conflicts error_with_patch() is passed a NULL commit
> which causes a segmentation fault when make_patch() tries to look it up.
> 
> This commit implements a minimal fix which fixes the crash and allows
> the user to successfully commit a conflict resolution with 'git rebase
> --continue'. It does not write .git/rebase-merge/patch,
> .git/rebase-merge/stopped-sha or update REBASE_HEAD. To sensibly get the
> hashes of the merge parents would require refactoring do_merge() to
> extract the code that parses the merge parents into a separate function
> which error_with_patch() could then use to write the parents into the
> stopped-sha file. To create meaningful output make_patch() and 'git
> rebase --show-current-patch' would also need to be modified to diff the
> merge parent and merge base in this case.
> 
> Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
ACK!

Thanks, Dscho

Previous: Phillip WoodNext: Junio C Hamano
Message 3 of 6 in “rebase -i: fix SIGSEGV when 'merge <branch>' fails”
  1. 0/2 rebase -i: fix SIGSEGV when 'merge <branch>' failsPhillip Wood, Aug 15, 2018
  2. 2/2 rebase -i: fix SIGSEGV when 'merge <branch>' failsPhillip Wood, Aug 15, 2018
  3. Johannes SchindelinAug 16, 2018
  4. Junio C HamanoAug 16, 2018
  5. Johannes SchindelinAug 27, 2018
  6. 1/2 t3430: add conflicting commitPhillip Wood, Aug 15, 2018

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.