Skip to content

Commit 925d73c

Browse files
committed
rerere: further clarify do_rerere_one_path()
Signed-off-by: Junio C Hamano <[email protected]>
1 parent c7a25d3 commit 925d73c

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

rerere.c

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -653,16 +653,13 @@ static void do_rerere_one_path(struct string_list_item *rr_item,
653653
fprintf(stderr,
654654
"Resolved '%s' using previous resolution.\n",
655655
path);
656-
goto mark_resolved;
656+
} else if (!handle_file(path, NULL, NULL)) {
657+
/* The user has resolved it. */
658+
copy_file(rerere_path(name, "postimage"), path, 0666);
659+
fprintf(stderr, "Recorded resolution for '%s'.\n", path);
660+
} else {
661+
return;
657662
}
658-
659-
/* Let's see if the user has resolved it. */
660-
if (handle_file(path, NULL, NULL))
661-
return; /* not yet resolved */
662-
663-
copy_file(rerere_path(name, "postimage"), path, 0666);
664-
fprintf(stderr, "Recorded resolution for '%s'.\n", path);
665-
mark_resolved:
666663
free(rr_item->util);
667664
rr_item->util = NULL;
668665
}

0 commit comments

Comments
 (0)