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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Galan Rémi  <remi.galan-alfonso@xxxxxxxxxxxxxxxxxxxxxxx> writes:

> Instead of removing a line to remove the commit, you can use the
> command "drop" (just like "pick" or "edit"). It has the same effect as
> deleting the line (removing the commit) except that you keep a visual
> trace of your actions, allowing a better control and reducing the
> possibility of removing a commit by mistake.
>
> Signed-off-by: Galan Rémi <remi.galan-alfonso@xxxxxxxxxxxxxxxxxxxxxxx>
> ---

Matthieu, is this part of your class project?

I vaguely recall that your school wants your sign-off to release
patches to us or something like that, and that I saw some other
patches came with your sign-off, so I am being curious.

> @@ -505,7 +506,7 @@ do_next () {
>  	rm -f "$msg" "$author_script" "$amend" || exit
>  	read -r command sha1 rest < "$todo"
>  	case "$command" in
> -	"$comment_char"*|''|noop)
> +	"$comment_char"*|''|noop|drop|d)
>  		mark_action_done
>  		;;
>  	pick|p)

Is this sufficient?

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?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]