summaryrefslogtreecommitdiff
path: root/builtin/diff-files.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2021-02-12 14:21:04 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-02-12 14:21:04 -0800
commit8b25dee6155fd3816f62649da196a4f42cf5584e (patch)
treeebf471c8cceee2aeed2e567fb485624a15613a50 /builtin/diff-files.c
parentMerge branch 'jk/complete-branch-force-delete' (diff)
parentMacOS: precompose_argv_prefix() (diff)
downloadtgif-8b25dee6155fd3816f62649da196a4f42cf5584e.tar.xz
Merge branch 'tb/precompose-prefix-too'
When commands are started from a subdirectory, they may have to compare the path to the subdirectory (called prefix and found out from $(pwd)) with the tracked paths. On macOS, $(pwd) and readdir() yield decomposed path, while the tracked paths are usually normalized to the precomposed form, causing mismatch. This has been fixed by taking the same approach used to normalize the command line arguments. * tb/precompose-prefix-too: MacOS: precompose_argv_prefix()
Diffstat (limited to 'builtin/diff-files.c')
-rw-r--r--builtin/diff-files.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/diff-files.c b/builtin/diff-files.c
index 4742a4559b..bb85266102 100644
--- a/builtin/diff-files.c
+++ b/builtin/diff-files.c
@@ -36,7 +36,7 @@ int cmd_diff_files(int argc, const char **argv, const char *prefix)
*/
rev.diffopt.ita_invisible_in_index = 1;
- precompose_argv(argc, argv);
+ prefix = precompose_argv_prefix(argc, argv, prefix);
argc = setup_revisions(argc, argv, &rev, NULL);
while (1 < argc && argv[1][0] == '-') {