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

Re: Re*: [PATCH 1/2] rebase -i --autosquash: demonstrate a problem skipping the last squash

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Sep 4, 2018, 22:27 UTC
Message-ID
<nycvar.QRO.7.76.6.1809050025480.71@tvgsbejvaqbjf.bet>
In-Reply-To
<xmqqd0tt9j0s.fsf_-_@gitster-ct.c.googlers.com>
Hi Junio,
On Tue, 4 Sep 2018, Junio C Hamano wrote:
Show 8 quoted lines
> "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
> writes:
> 
> > +	test_must_fail git -c core.editor="grep -q ^pick" \
> > +		rebase -ki --autosquash HEAD~4 &&
> 
> When merged to 'pu', this reveals that "git rebase" rewritten in C
> knows "--keep-empty" but not "-k".
I had already reported this:
https://public-inbox.org/git/nycvar.QRO.7.76.6.1808241803100.73@tvgsbejvaqbjf.bet/
Show 13 quoted lines
> 
> I did a quick eyeballing between master:git-rebase.sh and
> pu:builtin/rebase.c and I think that it is the only one that is
> missed, but somebody may want to lend us a second set of eyes.
> 
> -- >8 --
> Subject: rebase: re-add forgotten -k that stands for --keep-empty
> 
> 630a70ea ("builtin rebase: support `keep-empty` option", 2018-08-08)
> forgot that the option comes with a short-and-sweet -k synonym.  Add
> it back.
> 
> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Since this is not in `next` yet, let's do it the correct way. I had a fixup! sitting in my wip-rebase branch all the time, I just needed to find the time and motivation to figure out how to let GitGitGadget send a v2 when v1 was not sent via GitGitGadget.

Ciao, Dscho

Show 19 quoted lines
> ---
>  builtin/rebase.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/builtin/rebase.c b/builtin/rebase.c
> index 87590047b3..b26f9c10cf 100644
> --- a/builtin/rebase.c
> +++ b/builtin/rebase.c
> @@ -847,7 +847,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
>  			 &options.allow_rerere_autoupdate,
>  			 N_("allow rerere to update index  with resolved "
>  			    "conflict")),
> -		OPT_BOOL(0, "keep-empty", &options.keep_empty,
> +		OPT_BOOL('k', "keep-empty", &options.keep_empty,
>  			 N_("preserve empty commits during rebase")),
>  		OPT_BOOL(0, "autosquash", &options.autosquash,
>  			 N_("move commits that begin with "
> 
> 
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 8 in “rebase --autosquash: handle manual "final fixups"”
  1. 0/2 rebase --autosquash: handle manual "final fixups"Johannes Schindelin via GitGitGadget, Aug 31, 2018
  2. 1/2 rebase -i --autosquash: demonstrate a problem skipping the last squashJohannes Schindelin via GitGitGadget, Aug 31, 2018
  3. Re*: [PATCH 1/2] rebase -i --autosquash: demonstrate a problem skipping the last squashJunio C Hamano, Sep 4, 2018
  4. Johannes SchindelinSep 4, 2018
  5. Junio C HamanoSep 5, 2018
  6. 2/2 rebase -i: be careful to wrap up fixup/squash chainsJohannes Schindelin via GitGitGadget, Aug 31, 2018
  7. Junio C HamanoSep 4, 2018
  8. Johannes SchindelinSep 4, 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.