summaryrefslogtreecommitdiff
path: root/builtin/checkout.c
diff options
context:
space:
mode:
authorThomas Gummerer <t.gummerer@gmail.com>2016-09-14 21:07:47 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-09-15 19:13:54 (GMT)
commit610d55af0f082f6b866dc858e144c03d8ed4424c (patch)
tree00ddc8f01e22cd000590b00952eede317562fb7b /builtin/checkout.c
parentd9d7096662122f6b82ad6e4c08397b75906da78d (diff)
downloadgit-610d55af0f082f6b866dc858e144c03d8ed4424c.zip
git-610d55af0f082f6b866dc858e144c03d8ed4424c.tar.gz
git-610d55af0f082f6b866dc858e144c03d8ed4424c.tar.bz2
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>
Diffstat (limited to 'builtin/checkout.c')
-rw-r--r--builtin/checkout.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c
index c3486bd..3398c61 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -548,7 +548,7 @@ static int merge_working_tree(const struct checkout_opts *opts,
* entries in the index.
*/
- add_files_to_cache(NULL, NULL, 0, 0);
+ add_files_to_cache(NULL, NULL, 0);
/*
* NEEDSWORK: carrying over local changes
* when branches have different end-of-line