t7501: add test of "commit --dry-run --short"
[gitweb.git] / ll-merge.c
index 9fb855a90030e07e28c1ae9d0994006da22cd4ed..0e2800f7bb46bdf9e1713d210a5dc1c02fbbaa26 100644 (file)
@@ -154,7 +154,7 @@ static void create_temp(mmfile_t *src, char *path, size_t len)
 
        xsnprintf(path, len, ".merge_file_XXXXXX");
        fd = xmkstemp(path);
-       if (write_in_full(fd, src->ptr, src->size) != src->size)
+       if (write_in_full(fd, src->ptr, src->size) < 0)
                die_errno("unable to write temp-file");
        close(fd);
 }
@@ -371,7 +371,7 @@ int ll_merge(mmbuffer_t *result_buf,
        if (!check)
                check = attr_check_initl("merge", "conflict-marker-size", NULL);
 
-       if (!git_check_attr(path, check)) {
+       if (!git_check_attr(&the_index, path, check)) {
                ll_driver_name = check->items[0].value;
                if (check->items[1].value) {
                        marker_size = atoi(check->items[1].value);
@@ -398,7 +398,7 @@ int ll_merge_marker_size(const char *path)
 
        if (!check)
                check = attr_check_initl("conflict-marker-size", NULL);
-       if (!git_check_attr(path, check) && check->items[0].value) {
+       if (!git_check_attr(&the_index, path, check) && check->items[0].value) {
                marker_size = atoi(check->items[0].value);
                if (marker_size <= 0)
                        marker_size = DEFAULT_CONFLICT_MARKER_SIZE;