Subject: Re: Query on git commit amend

From: Viresh Kumar <[email-masked]>
Date: Wed, 7 Dec 2011 11:15:10 +0530

On 12/7/2011 10:23 AM, Björn Steinbrink wrote:
> That looks like you did something like:
> export GIT_EDITOR="cat git commit --amend"
> 
> But the original command was:
>   GIT_EDITOR=cat git commit --amend
> 
> Notice that there are no quotes and no escaped spaces. This is a
> shortcut to set GIT_EDITOR to "cat" for just this one command (git
> commit --amend).
> 
> If you want to set the editor in the environment, use just "export
> GIT_EDITOR=cat" or something like that.

Ok. Got it now.

Now, whats the benefit of 

GIT_EDITOR=cat git commit --amend

over

git commit --amend -C HEAD

?

Obviously if we have more than one commit to handle during a rebase then,
setting editor to cat once, would be good. As now we don't really need to
do git commit --amend. We can add commits and continue rebase.
But for single commit probably second one looks easier. Isn't it?
Or maybe the latest patch from Junio is even better.

-- 
viresh