diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-01-20 11:43:35 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-01-20 11:43:35 -0800 |
commit | 7a63c9e3da357a21115e9b5de7ed84b744f9d8b1 (patch) | |
tree | 97d1f8f28303c0e0f96e2ae3133f252482d28399 /git-compat-util.h | |
parent | 85705cfb572878296f26a7fef0d174b5ec694161 (diff) | |
parent | ea56518dfe4c7934a6895f25edf0f18d2930e4fd (diff) | |
download | git-7a63c9e3da357a21115e9b5de7ed84b744f9d8b1.tar.gz |
Merge branch 'js/fopen-harder'
Some codepaths used fopen(3) when opening a fixed path in $GIT_DIR
(e.g. COMMIT_EDITMSG) that is meant to be left after the command is
done. This however did not work well if the repository is set to
be shared with core.sharedRepository and the umask of the previous
user is tighter. They have been made to work better by calling
unlink(2) and retrying after fopen(3) fails with EPERM.
* js/fopen-harder:
Handle more file writes correctly in shared repos
commit: allow editing the commit message even in shared repos
Diffstat (limited to 'git-compat-util.h')
-rw-r--r-- | git-compat-util.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h index 2da0a75a38..e8f2867228 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -733,6 +733,7 @@ extern int xmkstemp_mode(char *template, int mode); extern int odb_mkstemp(char *template, size_t limit, const char *pattern); extern int odb_pack_keep(char *name, size_t namesz, const unsigned char *sha1); extern char *xgetcwd(void); +extern FILE *fopen_for_writing(const char *path); #define REALLOC_ARRAY(x, alloc) (x) = xrealloc((x), (alloc) * sizeof(*(x))) |