Thread (38 messages) 38 messages, 18 authors, 2016-08-11

Re: [PATCH 0/2] Making "git commit" to mean "git commit -a".

From: Jakub Narebski <hidden>
Date: 2016-08-11 19:49:09

Possibly related (same subject, not in this thread)

Linus Torvalds wrote:
The _original_ "git add" was literally just this one-liner:

        #!/bin/sh
        git-update-index --add -- "$@"

which actually was better in this respect (it updated the content), but 
that didn't do sub-directories, so this is arguable a bug introduced by 
commit 37539fbd: 

    [PATCH] Improved "git add"

    This fixes everybodys favourite complaint about "git add", namely that it
    doesn't take directories.

which started using 

        git-ls-files --others -z -- "$@"

together with the exclude files to generate the list of files to add. At 
that point, we lost files that already existed (since "--others" specifies 
just files we don't know about).
So should we use then

        git-ls-files --cached --others -z -- "$@"

in git-add?

I'm very much for having git-add, -rm, -mv and -resolved as porcelain
wrappers around git update-index, so there would be even less events
when you have to use this plumbish command directly.
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help