diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-03-14 00:16:42 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-03-14 00:16:42 -0700 |
commit | 16007f3916b885d29de6c48832aa6a4213ab7588 (patch) | |
tree | a32a16393cb312398d8c96e61daef15cb708b7f2 /builtin-merge-file.c | |
parent | ca885a4fe6444bed840295378848904106c87c85 (diff) | |
parent | 1b56bc9a1545902db64b8bdce48a499900acfe0b (diff) | |
download | git-16007f3916b885d29de6c48832aa6a4213ab7588.tar.gz git-16007f3916b885d29de6c48832aa6a4213ab7588.tar.xz |
Merge branch 'maint'
* maint:
merge-file: handle empty files gracefully
merge-recursive: handle file mode changes
Minor wording changes in the keyboard descriptions in git-add --interactive.
git fetch: Take '-n' to mean '--no-tags'
quiltimport: fix misquoting of parsed -p<num> parameter
git-quiltimport: better parser to grok "enhanced" series files.
Diffstat (limited to 'builtin-merge-file.c')
-rw-r--r-- | builtin-merge-file.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin-merge-file.c b/builtin-merge-file.c index adce6d463..3605960c2 100644 --- a/builtin-merge-file.c +++ b/builtin-merge-file.c @@ -57,7 +57,8 @@ int cmd_merge_file(int argc, const char **argv, const char *prefix) if (!f) ret = error("Could not open %s for writing", filename); - else if (fwrite(result.ptr, result.size, 1, f) != 1) + else if (result.size && + fwrite(result.ptr, result.size, 1, f) != 1) ret = error("Could not write to %s", filename); else if (fclose(f)) ret = error("Could not close %s", filename); |