]> git.ipfire.org Git - thirdparty/git.git/commit - cache.h
add: modify already added files when --chmod is given
authorThomas Gummerer <t.gummerer@gmail.com>
Wed, 14 Sep 2016 21:07:47 +0000 (22:07 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 15 Sep 2016 19:13:54 +0000 (12:13 -0700)
commit610d55af0f082f6b866dc858e144c03d8ed4424c
tree00ddc8f01e22cd000590b00952eede317562fb7b
parentd9d7096662122f6b82ad6e4c08397b75906da78d
add: modify already added files when --chmod is given

When the chmod option was added to git add, it was hooked up to the diff
machinery, meaning that it only works when the version in the index
differs from the version on disk.

As the option was supposed to mirror the chmod option in update-index,
which always changes the mode in the index, regardless of the status of
the file, make sure the option behaves the same way in git add.

Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/add.c
builtin/checkout.c
builtin/commit.c
cache.h
read-cache.c
t/t3700-add.sh