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

Re: [PATCH] rebase: new option to post edit a squashed or fixed up commit

From
Duy Nguyen <pclouds@gmail.com>
Date
Mar 11, 2014, 10:01 UTC
Message-ID
<CACsJy8C4xs+EsXshR8ppb063uv=cBBB+evgaVaZXt+NATk6SJQ@mail.gmail.com>
In-Reply-To
<xmqqob1drg3b.fsf@gitster.dls.corp.google.com>
On Tue, Mar 11, 2014 at 2:47 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 13 quoted lines
> Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:
>
>> After squashing or fixing up, you may want to have a final look at the
>> commit, edit some more if needed or even do some testing. --postedit
>> enables that. This is (to me) a paranoid mode so either I enable it
>> for all squashes and fixups, or none. Hence a new option, not new todo
>> commands that give finer selection.
>
> If we were to adopt Michael's (?) idea of allowing flags to each
> insn in the insn sheet, would this restriction be easily lifted?
>
> That is, instead of saying "squash", you say "squash --stop" or
> something.

I think I still need something similar, otherwise I would need to s/squash/squash --stop/ after "rebase -i --autosquash". --postedit code could be simplified by generating "squash --stop" though.

Show 20 quoted lines
>> diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
>> index a1adae8..42061fc 100644
>> --- a/git-rebase--interactive.sh
>> +++ b/git-rebase--interactive.sh
>> @@ -571,6 +571,11 @@ do_next () {
>>                       ;;
>>               esac
>>               record_in_rewritten $sha1
>> +             if test -n "$postedit"
>> +             then
>> +                     warn "Stopped at $sha1... $rest"
>> +                     exit_with_patch $sha1 0
>> +             fi
>>               ;;
>
> I would have expected that any new code would stop only at the last
> squash (or fixup) in a series of squashes, but this appears to stop
> even at an intermediate squashed result, which will not appear in
> the final history.  Am I misreading the patch (or misunderstanding
> the intent of the patch)?
Never thought of that case. Yes it should only stop at the last squash/fixup.
-- 
Duy
Previous: Junio C Hamano
Message 3 of 3 in “rebase: new option to post edit a squashed or fixed up commit”
  1. rebase: new option to post edit a squashed or fixed up commitNguyễn Thái Ngọc Duy, Mar 9, 2014
  2. Junio C HamanoMar 10, 2014
  3. Duy NguyenMar 11, 2014

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.