# is it a bug that git status show the in-progress 'edit' in an interactive rebase as 'done'?

4 messages from 2024-02-06 to 2024-02-06. Participants: Britton Kerin, Oswald Buddenhagen, Sergey Organov.
Thread: https://gitlist.dev/t/60856

## Britton Kerin, 2024-02-06 10:02

Subject: is it a bug that git status show the in-progress 'edit' in an interactive rebase as 'done'?
Message-ID: <CAC4O8c_oKT+a0hm+tqSOG7d1=AuJJKy5bsh72cJKVsWynvHw+w@mail.gmail.com>
URL: https://gitlist.dev/e/CAC4O8c_oKT%2Ba0hm%2BtqSOG7d1%3DAuJJKy5bsh72cJKVsWynvHw%2Bw%40mail.gmail.com

```
If I do 'git rebase -i master' from a branch then set the action of
the first two commits of a branch being rebased to 'edit' and exit the
editor, an immediately subsequent 'git status' shows (for example):

git status
interactive rebase in progress; onto e79552d197
Last command done (1 command done):
   edit 71b73de914 message for first commit
Next commands to do (6 remaining commands):
   edit 3a478a7a08 message for second commit
   pick fab7159cf4 message for third commit
  (use "git rebase --edit-todo" to view and edit)
You are currently editing a commit while rebasing branch
'my_completion_updates' on 'e79552d197'.
  (use "git commit --amend" to amend the current commit)
  (use "git rebase --continue" once you are satisfied with your changes)

This seems wrong, because until git rebase --continue has been done
the edit operation for the first commit is *ongoing* and it would be
much clearer for the output of status to accurately say so.

The same applies to edit operations that don't happen to be the first.

Is this a bug or is there some reason it's like this that I'm not seeing?

Britton

```

## Oswald Buddenhagen, 2024-02-06 11:32

Subject: Re: is it a bug that git status show the in-progress 'edit' in an interactive rebase as 'done'?
Message-ID: <ZcIYz82iLxPOVR9Q@ugly>
URL: https://gitlist.dev/e/ZcIYz82iLxPOVR9Q%40ugly
In-Reply-To: <CAC4O8c_oKT+a0hm+tqSOG7d1=AuJJKy5bsh72cJKVsWynvHw+w@mail.gmail.com>

```
On Tue, Feb 06, 2024 at 01:02:43AM -0900, Britton Kerin wrote:
>>Last command done (1 command done):
>>   edit 71b73de914 message for first commit
>>...
>>You are currently editing a commit while rebasing branch
>>...
>
>This seems wrong, because until git rebase --continue has been done
>the edit operation for the first commit is *ongoing* and it would be
>much clearer for the output of status to accurately say so.
>
it makes a lot of more sense when you decompose 'edit' into 'pick'
followed by 'break', which it essentially is. so from git's perspective,
the command really _is_ already done. note that in this state, you can
do all kinds of crazy things - including adding new commits (possibly by
cherry-picking them) and even dropping already rewritten commits (using
a hard reset). so in a way, the message above is even a bit too
suggestive.

```

## Sergey Organov, 2024-02-06 19:45

Subject: Re: is it a bug that git status show the in-progress 'edit' in an interactive rebase as 'done'?
Message-ID: <87il31s7g1.fsf@osv.gnss.ru>
URL: https://gitlist.dev/e/87il31s7g1.fsf%40osv.gnss.ru
In-Reply-To: <ZcIYz82iLxPOVR9Q@ugly>

```
Oswald Buddenhagen <oswald.buddenhagen@gmx.de> writes:

> On Tue, Feb 06, 2024 at 01:02:43AM -0900, Britton Kerin wrote:
>>>Last command done (1 command done):
>>>   edit 71b73de914 message for first commit
>>>...
>>>You are currently editing a commit while rebasing branch
>>>...
>>
>>This seems wrong, because until git rebase --continue has been done
>>the edit operation for the first commit is *ongoing* and it would be
>>much clearer for the output of status to accurately say so.
>>
> it makes a lot of more sense when you decompose 'edit' into 'pick'
> followed by 'break', which it essentially is. so from git's perspective,
> the command really _is_ already done. note that in this state, you can
> do all kinds of crazy things - including adding new commits (possibly by
> cherry-picking them) and even dropping already rewritten commits (using
> a hard reset). so in a way, the message above is even a bit too
> suggestive.

Yep. Maybe, if the rebase action itself were called "amend" rather than
"edit", it'd have been more clear and consistent thus less confusing.
Check:

git status
interactive rebase in progress; onto e79552d197
Last command done (1 command done):
   amend 71b73de914 message for first commit
Next commands to do (6 remaining commands):
   amend 3a478a7a08 message for second commit
   pick fab7159cf4 message for third commit
  (use "git rebase --edit-todo" to view and edit)
You are currently amending a commit while rebasing branch
'my_completion_updates' on 'e79552d197'.
  (use "git commit --amend" to amend the current commit)
  (use "git rebase --continue" once you are satisfied with your changes)

-- 
Sergey

```

## Britton Kerin, 2024-02-06 20:09

Subject: Re: is it a bug that git status show the in-progress 'edit' in an interactive rebase as 'done'?
Message-ID: <CAC4O8c_1JnDc5v+_xS9Q=0fJmoK3e8iYiag2gT8KchcJdvgcTg@mail.gmail.com>
URL: https://gitlist.dev/e/CAC4O8c_1JnDc5v%2B_xS9Q%3D0fJmoK3e8iYiag2gT8KchcJdvgcTg%40mail.gmail.com
In-Reply-To: <ZcIYz82iLxPOVR9Q@ugly>

```
On Tue, Feb 6, 2024 at 2:32 AM Oswald Buddenhagen
<oswald.buddenhagen@gmx.de> wrote:
>
> On Tue, Feb 06, 2024 at 01:02:43AM -0900, Britton Kerin wrote:
> >>Last command done (1 command done):
> >>   edit 71b73de914 message for first commit
> >>...
> >>You are currently editing a commit while rebasing branch
> >>...
> >
> >This seems wrong, because until git rebase --continue has been done
> >the edit operation for the first commit is *ongoing* and it would be
> >much clearer for the output of status to accurately say so.
> >
> it makes a lot of more sense when you decompose 'edit' into 'pick'
> followed by 'break', which it essentially is. so from git's perspective,
> the command really _is_ already done. note that in this state, you can

well viewed this way the pick may be done but not the implicit break

> do all kinds of crazy things - including adding new commits (possibly by
> cherry-picking them) and even dropping already rewritten commits (using
> a hard reset). so in a way, the message above is even a bit too
> suggestive.

Yes.  I'd handle this by changing the description of edit offered in
the comments in the todo to better reflect the possibilities.  The
hints that git rebase -i  (or --continue I guess) gives when it hits
the edit commit also don't reflect all the possibilities very well.

Britton

```
