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>
This commit is contained in:

committed by
Junio C Hamano

parent
d9d7096662
commit
610d55af0f
@ -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
|
||||
|
Reference in New Issue
Block a user