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/commit.c | |
parent | d9d7096662122f6b82ad6e4c08397b75906da78d (diff) | |
download | git-610d55af0f082f6b866dc858e144c03d8ed4424c.tar.gz |
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/commit.c')
-rw-r--r-- | builtin/commit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/commit.c b/builtin/commit.c index 163dbcabf3..443ff9196d 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -386,7 +386,7 @@ static const char *prepare_index(int argc, const char **argv, const char *prefix */ if (all || (also && pathspec.nr)) { hold_locked_index(&index_lock, 1); - add_files_to_cache(also ? prefix : NULL, &pathspec, 0, 0); + add_files_to_cache(also ? prefix : NULL, &pathspec, 0); refresh_cache_or_die(refresh_flags); update_main_cache_tree(WRITE_TREE_SILENT); if (write_locked_index(&the_index, &index_lock, CLOSE_LOCK)) |