Re: [PATCH 0/2] Making "git commit" to mean "git commit -a".
- From
Nicolas Pitre <nico@cam.org>
- Date
- Nov 30, 2006, 22:46 UTC
- Message-ID
- <Pine.LNX.4.64.0611301740540.9647@xanadu.home>
- In-Reply-To
- <7vac28h898.fsf@assigned-by-dhcp.cox.net>
On Thu, 30 Nov 2006, Junio C Hamano wrote:
Show 11 quoted lines
> What this will "achieve" is:
>
> $ git add hello.c ;# index remembers the path
> $ git diff ;# nothing -- it sees 0{40} and 0{40} on both sides
> $ edit hello.c
> $ git diff ;# still nothing
> $ git commit ;# takes the content of 'hello.c' at this point
>
> This is a non-trivial amount of work but not a rocket science.
> It is however of a negative value that helps the users stick to
> the "filename matters more than content" mindset.And personally I think this bastardizes the index.
I think so far the index is not a problem. the problem is in the UI and in the doc. With a "git add" as I described it I don't think the user will ask for such thing.
And let's have a "git diff --commit" be a much meaningful alias for the appropriate diff argument (which argument I always forget about myself) needed to show what is going to be committed.