diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-02-05 14:54:11 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-02-05 14:54:11 -0800 |
commit | da07df3ee3ff8c9d676db6be04a76ead1d9919d8 (patch) | |
tree | ac1af8bb8c69573847fb454fd6c603ab7e1ee674 /builtin/fast-export.c | |
parent | Merge branch 'nd/exclusion-regression-fix' into maint (diff) | |
parent | Handle more file writes correctly in shared repos (diff) | |
download | tgif-da07df3ee3ff8c9d676db6be04a76ead1d9919d8.tar.xz |
Merge branch 'js/fopen-harder' into maint
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 'builtin/fast-export.c')
-rw-r--r-- | builtin/fast-export.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/fast-export.c b/builtin/fast-export.c index d9ac5d8410..2471297f71 100644 --- a/builtin/fast-export.c +++ b/builtin/fast-export.c @@ -880,7 +880,7 @@ static void export_marks(char *file) FILE *f; int e = 0; - f = fopen(file, "w"); + f = fopen_for_writing(file); if (!f) die_errno("Unable to open marks file %s for writing.", file); |