Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'jk/epipe-in-async' into maint
[gitweb.git]
/
builtin
/
fetch.c
diff --git
a/builtin/fetch.c
b/builtin/fetch.c
index 5b58001a982d0c0361c8693d05c609fd0b5fcd9c..17f40e10f6960e73fa1bff0024c7e1a09a1d8503 100644
(file)
--- a/
builtin/fetch.c
+++ b/
builtin/fetch.c
@@
-837,7
+837,7
@@
static void check_not_current_branch(struct ref *ref_map)
static int truncate_fetch_head(void)
{
const char *filename = git_path_fetch_head();
- FILE *fp = fopen
(filename, "w"
);
+ FILE *fp = fopen
_for_writing(filename
);
if (!fp)
return error(_("cannot open %s: %s\n"), filename, strerror(errno));