]> git.ipfire.org Git - thirdparty/git.git/commit - builtin/update-index.c
update-index: add untracked cache notifications
authorChristian Couder <christian.couder@gmail.com>
Sun, 24 Jan 2016 15:28:17 +0000 (16:28 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 25 Jan 2016 20:39:34 +0000 (12:39 -0800)
commit6d19db1491f1f48c5112f460e1f2d2e359e113c9
tree1ed08cbf40630b39e9322fe0a5196a27fc7e1ebd
parenteaab83d0e574c9f3440a2364a7975f9ffe75f188
update-index: add untracked cache notifications

Attempting to flip the untracked-cache feature on for a random index
file with

    cd /random/unrelated/place
    git --git-dir=/somewhere/else/.git update-index --untracked-cache

would not work as you might expect. Because flipping the feature on
in the index also records the location of the corresponding working
tree (/random/unrelated/place in the above example), when the index
is subsequently used to keep track of files in the working tree in
/somewhere/else, the feature is disabled.

With this patch "git update-index --[test-]untracked-cache" tells the
user in which directory tests are performed. This makes it easy to
spot any problem.

Also in verbose mode, let's tell the user when the cache is enabled
or disabled.

Helped-by: Duy Nguyen <pclouds@gmail.com>
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/update-index.c