diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-09-11 11:23:45 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-09-11 11:23:54 -0700 |
commit | 1c88a6d17492b197b9b3298cbc34efa804928302 (patch) | |
tree | b0370caa6322930a13898673c5a559aef20c8791 /merge-recursive.c | |
parent | 31190841049549b5daaffeb0b9888ebed0bbfc8a (diff) | |
parent | e09e4024a070e666ed40b66442e8151b91d623e4 (diff) | |
download | git-1c88a6d17492b197b9b3298cbc34efa804928302.tar.gz |
Sync with 1.7.11.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'merge-recursive.c')
-rw-r--r-- | merge-recursive.c | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/merge-recursive.c b/merge-recursive.c index 39b2e165e0..7866ca1026 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -493,8 +493,7 @@ static struct string_list *get_renames(struct merge_options *o, opts.rename_score = o->rename_score; opts.show_rename_progress = o->show_rename_progress; opts.output_format = DIFF_FORMAT_NO_OUTPUT; - if (diff_setup_done(&opts) < 0) - die(_("diff setup failed")); + diff_setup_done(&opts); diff_tree_sha1(o_tree->object.sha1, tree->object.sha1, "", &opts); diffcore_std(&opts); if (opts.needed_rename_limit > o->needed_rename_limit) @@ -614,23 +613,6 @@ static char *unique_path(struct merge_options *o, const char *path, const char * return newpath; } -static void flush_buffer(int fd, const char *buf, unsigned long size) -{ - while (size > 0) { - long ret = write_in_full(fd, buf, size); - if (ret < 0) { - /* Ignore epipe */ - if (errno == EPIPE) - break; - die_errno("merge-recursive"); - } else if (!ret) { - die(_("merge-recursive: disk full?")); - } - size -= ret; - buf += ret; - } -} - static int dir_in_way(const char *path, int check_working_copy) { int pos, pathlen = strlen(path); @@ -789,7 +771,7 @@ static void update_file_flags(struct merge_options *o, fd = open(path, O_WRONLY | O_TRUNC | O_CREAT, mode); if (fd < 0) die_errno(_("failed to open '%s'"), path); - flush_buffer(fd, buf, size); + write_in_full(fd, buf, size); close(fd); } else if (S_ISLNK(mode)) { char *lnk = xmemdupz(buf, size); |