diff options
author | Thomas Gummerer <t.gummerer@gmail.com> | 2016-09-14 22:07:47 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-09-15 12:13:54 -0700 |
commit | 610d55af0f082f6b866dc858e144c03d8ed4424c (patch) | |
tree | 00ddc8f01e22cd000590b00952eede317562fb7b /builtin/checkout.c | |
parent | read-cache: introduce chmod_index_entry (diff) | |
download | tgif-610d55af0f082f6b866dc858e144c03d8ed4424c.tar.xz |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c index c3486bdec3..3398c61e9a 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 |