aboutsummaryrefslogtreecommitdiffstats
path: root/git-compat-util.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-02-12 14:21:04 -0800
committerJunio C Hamano <gitster@pobox.com>2021-02-12 14:21:04 -0800
commit8b25dee6155fd3816f62649da196a4f42cf5584e (patch)
treeebf471c8cceee2aeed2e567fb485624a15613a50 /git-compat-util.h
parent006c5f79be55c029d6f68ea0d5a33cb41d1b5e80 (diff)
parent5c327502dbf7a27c8784c20037851206a87857c1 (diff)
downloadgit-8b25dee6155fd3816f62649da196a4f42cf5584e.tar.gz
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 'git-compat-util.h')
-rw-r--r--git-compat-util.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index 5d5e47fbe2..838246289c 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -252,9 +252,9 @@ typedef unsigned long uintptr_t;
#ifdef PRECOMPOSE_UNICODE
#include "compat/precompose_utf8.h"
#else
-static inline void precompose_argv(int argc, const char **argv)
+static inline const char *precompose_argv_prefix(int argc, const char **argv, const char *prefix)
{
- ; /* nothing */
+ return prefix;
}
#define probe_utf8_pathname_composition()
#endif