Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-12-09 02:11:19 +0300
committerJunio C Hamano <gitster@pobox.com>2020-12-09 02:11:20 +0300
commit9b3b4adb3fc586d14bbe2bfa7ba5f682a87e903d (patch)
treede731e55f8d7e4fe0acb67bf48433c97cf5306f4 /cache.h
parent945158016ac82fb8ecb4591a5ee8b3b4e165d842 (diff)
parenteb3c027e1779d0d1b5bd3b4e96a108461c9759a5 (diff)
Merge branch 'mt/do-not-use-scld-in-working-tree'
"git apply" adjusted the permission bits of working-tree files and directories according core.sharedRepository setting by mistake and for a long time, which has been corrected. * mt/do-not-use-scld-in-working-tree: apply: don't use core.sharedRepository to create working tree files
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/cache.h b/cache.h
index e986cf4ea9..8d279bc110 100644
--- a/cache.h
+++ b/cache.h
@@ -1255,7 +1255,11 @@ int adjust_shared_perm(const char *path);
* safe_create_leading_directories() temporarily changes path while it
* is working but restores it before returning.
* safe_create_leading_directories_const() doesn't modify path, even
- * temporarily.
+ * temporarily. Both these variants adjust the permissions of the
+ * created directories to honor core.sharedRepository, so they are best
+ * suited for files inside the git dir. For working tree files, use
+ * safe_create_leading_directories_no_share() instead, as it ignores
+ * the core.sharedRepository setting.
*/
enum scld_error {
SCLD_OK = 0,
@@ -1266,6 +1270,7 @@ enum scld_error {
};
enum scld_error safe_create_leading_directories(char *path);
enum scld_error safe_create_leading_directories_const(const char *path);
+enum scld_error safe_create_leading_directories_no_share(char *path);
/*
* Callback function for raceproof_create_file(). This function is