Re: [PATCH 1/5] rerere: avoid misrecording on a skipped or aborted rebase/am
- From
Junio C Hamano <junkio@cox.net>
- Date
- Dec 8, 2006, 20:43 UTC
- Message-ID
- <7v7ix2i0e5.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <11655749724034-git-send-email-normalperson@yhbt.net>
Eric Wong <normalperson@yhbt.net> writes:
Show 10 quoted lines
> +if (@ARGV && $ARGV[0] eq 'clear') {
> + for my $path (keys %merge_rr) {
> + my $name = $merge_rr{$path};
> + if (-d "$rr_dir/$name") {
> + rmtree(["$rr_dir/$name"]);
> + }
> + }
> + unlink $merge_rr;
> + exit 0;
> +}Come to think of it, I am not sure about this one. Don't you need to make sure that there is no existing resolution before removing it? In other words, shouldn't the removal be like this?
if (-d "$rr_dir/$name" && ! -f "$rr_dir/$name/postimage") {
rmtree(["$rr_dir/$name"]);
}