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

Re: [PATCH 3/5] rebase -i: include MERGE_HEAD into files to clean up

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 13, 2018, 02:07 UTC
Message-ID
<xmqqpnv9ybkh.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<65f02628f6ef96e88485b66cd2c6e5e57212b4bb.1542065154.git.gitgitgadget@gmail.com>

"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com> writes:

Show 10 quoted lines
> From: Johannes Schindelin <johannes.schindelin@gmx.de>
>
> Every once in a while, the interactive rebase makes sure that no stale
> files are lying around. These days, we need to include MERGE_HEAD into
> that set of files, as the `merge` command will generate them.
>
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> ---
>  sequencer.c | 2 ++
>  1 file changed, 2 insertions(+)
Makes sense.
Show 21 quoted lines
>
> diff --git a/sequencer.c b/sequencer.c
> index 7a9cd81afb..2f526390ac 100644
> --- a/sequencer.c
> +++ b/sequencer.c
> @@ -3459,6 +3459,7 @@ static int pick_commits(struct todo_list *todo_list, struct replay_opts *opts)
>  			unlink(rebase_path_author_script());
>  			unlink(rebase_path_stopped_sha());
>  			unlink(rebase_path_amend());
> +			unlink(git_path_merge_head(the_repository));
>  			delete_ref(NULL, "REBASE_HEAD", NULL, REF_NO_DEREF);
>  
>  			if (item->command == TODO_BREAK)
> @@ -3829,6 +3830,7 @@ static int commit_staged_changes(struct replay_opts *opts,
>  			   opts, flags))
>  		return error(_("could not commit staged changes."));
>  	unlink(rebase_path_amend());
> +	unlink(git_path_merge_head(the_repository));
>  	if (final_fixup) {
>  		unlink(rebase_path_fixup_msg());
>  		unlink(rebase_path_squash_msg());
Previous: Johannes Schindelin via GitGitGadgetNext: Johannes Schindelin via GitGitGadget
Message 10 of 14 in “Assorted fixes revolving around rebase and merges”
  1. 0/5 Assorted fixes revolving around rebase and mergesJohannes Schindelin via GitGitGadget, Nov 12, 2018
  2. 1/5 rebase -r: demonstrate bug with conflicting mergesJohannes Schindelin via GitGitGadget, Nov 12, 2018
  3. Junio C HamanoNov 13, 2018
  4. Johannes SchindelinNov 13, 2018
  5. Junio C HamanoNov 13, 2018
  6. Johannes SchindelinNov 13, 2018
  7. Junio C HamanoNov 13, 2018
  8. 2/5 rebase -r: do not write MERGE_HEAD unless neededJohannes Schindelin via GitGitGadget, Nov 12, 2018
  9. 3/5 rebase -i: include MERGE_HEAD into files to clean upJohannes Schindelin via GitGitGadget, Nov 12, 2018
  10. Junio C HamanoNov 13, 2018
  11. 4/5 built-in rebase --skip/--abort: clean up stale .git/<name> filesJohannes Schindelin via GitGitGadget, Nov 12, 2018
  12. Junio C HamanoNov 13, 2018
  13. Johannes SchindelinNov 13, 2018
  14. 5/5 status: rebase and merge can be in progress at the same timeJohannes Schindelin via GitGitGadget, Nov 12, 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.