Re: Call Me Gitless
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:45:12
Daniel Barkalow [off-list ref] writes:
On Mon, 18 Aug 2008, Junio C Hamano wrote: ...quoted
If we had a configuration for "index-free" people, that changes the semantics of "git add" to register object name of an empty blob when a new path is added, makes "git add" for existing blobs a no-op, but keeps "git commit -a" and "git commit <paths>" to operate as they currently do, then people with such configuration could: $ >new-file $ git add new-file $ edit old-file $ edit new-file $ git diff to always see what's the difference from the HEAD is with "git diff", and any of these three: $ git commit -a $ git commit old-file $ git commit old-file new-file would work as expected by them. We still need to support the three diff variants for normal git people, but people who do not use index do not have to know the two variants ("git diff" vs "git diff HEAD"); such a change could be argued as a "UI improvement" [*1*].I think that having the possibility of adding an empty blob (or maybe a magical "nothing currently here but git-ls-files includes it") would be preferrable to a no-index mode.
I am not sure if you are really saying something different from what I am saying. We'll see after this three patch series. The first one is an unrelated bugfix (but the bug won't trigger with existing callers -- only triggered with the added codepath).