Re: [PATCH] rebase -i: only automatically amend commit if HEAD did not change

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

 



On Tue, Jul 22, 2008 at 06:22:34PM -0400, Avery Pennarun wrote:
> 
> This patch is perhaps a symptom of something I've been meaning to ask
> about for a while.
> 
> Why doesn't "edit" just stage the commit and not auto-commit it at
> all?  That way an amend would *never* be necessary, and rebase
> --continue would always do a commit -a (if there was anything left to
> commit).

Actually, it would be better to refuse to continue if there are unstaged
changes in the work tree, and if all changes are staged then just do git
commit.

> The special case fixed by this patch would thus not be
> needed.
> 
> It would also make it more obvious how to remove files from a commit,
> for example, without having to learn about "git reset".  For that
> matter, you wouldn't have to learn about "git commit --amend" either,
> and it would save typing.

It would not only save typing, but also help to avoid costly mistakes
where users, being taught to use "git commit --amend" after editing
during git-rebase, fire this command automatically after a conflict
resolution and get two commits accidently squashed.

So, I completely agree that the current auto-commit behavior is not very
user friendly...

Dmitry
--
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]

  Powered by Linux