On Thu, 30 Nov 2006, Junio C Hamano wrote:
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.