Re: [PATCH/RFCv2 1/2] git-rebase -i: add command "drop" to remove a commit

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH/RFCv2 1/2] git-rebase -i: add command "drop" to remove a commit

From: Matthieu Moy <hidden>
Date: 2016-06-15 23:05:05

Remi Galan Alfonso [off-list ref] writes:
Junio C Hamano [off-list ref] writes:
quoted
Is this sufficient?
quoted
If you are going to do something in 2/2 that relies on the format of
this line being correct (as opposed to "noop" or "#" that can have
any garbage on the remainder of the line), wouldn't you want to at
least check $sha1 is sensible?
That's also something that I was wondering, I wrote about it in the
0/2 part of this patch, I wanted some opinion about it.
Ideally, I think we should do a sanity check before starting the rebase,
and error out if we encounter an invalid command, a command that should
be followed by a valid sha1 and does not, ...

But currently, we do the verification while applying commands, and I
don't think there's anything really helpful to do if we encounter a
"drop this-is-not-a-sha1" command.

So, IMHO, why not do this check, but I'm not sure it will actually help
much.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

Re: [PATCH/RFCv2 1/2] git-rebase -i: add command "drop" to remove a commit

From: Remi Galan Alfonso <hidden>
Date: 2016-06-15 23:05:05

Ideally, I think we should do a sanity check before starting the rebase,
and error out if we encounter an invalid command, a command that should
be followed by a valid sha1 and does not, ...

But currently, we do the verification while applying commands, and I
don't think there's anything really helpful to do if we encounter a
"drop this-is-not-a-sha1" command.
While I agree that doing a sanity check before starting the rebase is
a better idea, it would not be logic to do so only for the 'drop'
command, it should be done for all of the various commands (as you
said, checking if the commands are valid, checking if the SHA-1
following the command is valid if it was expecting one...).

However I think that it should be in a different patch, changing the
whole checking system of rebase is not directly linked to the idea of
the 'drop' command.

Rémi
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help