threads / rfc / 39456

patch, 2 partsRe: [PATCH/RFC 1/2] git-rebase -i: Add key word "drop" to remove a commit

Subject: Re: [PATCH/RFC 1/2] git-rebase -i: Add key word "drop" to remove a commit

## tl;dr

2 messages between May 29, 2015 and May 29, 2015. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Remi Galan Alfonso· May 29, 2015, 08:33 UTC · lore
At first we wanted a clear indication about removing a commit in
rebase -i. We didn't know about the noop command.
 - 'noop' does the same thing as 'drop' but for the user deleting a
   commit through 'noop' doesn't seem to be the proper way to use this
   command. Moreover 'noop' is not documented (especially it is not
   shown in the short help that is display in the editor during the
   rebase -i)
 - Commenting the line does the same but will cause problems with the
   second part of the patch (warn about removed commits) because the
   line is then not taken into consideration.

We wanted to add the 'drop' command because we wanted a way for clearly deleting a commit (and also for the second part of the patch) and there is no clear way so far.

Junio C Hamano· May 29, 2015, 15:36 UTC · re: Remi Galan Alfonso · lore

Remi Galan Alfonso <remi.galan-alfonso@ensimag.grenoble-inp.fr> writes:

Show 7 quoted lines
> At first we wanted a clear indication about removing a commit in
> rebase -i. We didn't know about the noop command.
>  - 'noop' does the same thing as 'drop' but for the user deleting a
>    commit through 'noop' doesn't seem to be the proper way to use this
>    command. Moreover 'noop' is not documented (especially it is not
>    shown in the short help that is display in the editor during the
>    rebase -i)

As Matthieu said elsewhere during the discussion, 'noop' is merely to ignore everything that follows (so 'noop stupid git' does not mean "ignore commit identified by 'stupid git'") and the only reason why it exists is as a hack to have a way to make a non-empty todo list, because an empty todo list means "do not do anything, not even rewinding to the onto commit".

As such, I actually think it is a mistake to consider 'noop' as "drop _this_ commit"; the remainder of the line that begins with 'noop' does not name any commit.

← back to recent threads