git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/5] rerere: avoid misrecording on a skipped or aborted rebase/am

From
EWEric Wong <normalperson@yhbt.net>
Date
Dec 8, 2006, 21:28 UTC
Message-ID
<20061208212830.GB13944@localdomain>
In-Reply-To
<7v7ix2i0e5.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> wrote:
Show 20 quoted lines
> Eric Wong <normalperson@yhbt.net> writes:
> 
> > +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"]);
> 	}

Yes. However, it seems unlikely, that MERGE_RR would point to something that has a postimage. I suppose that a machine could crash or a user could've hit ^C at the correct millisecond that would cause rerere to not update MERGE_RR correctly.

Updated patches on the way (leaving out the status updates).
Previous: Junio C HamanoNext: Eric Wong
Message 2 of 7 in “Re: [PATCH 1/5] rerere: avoid misrecording on a skipped or aborted rebase/am”
  1. Junio C HamanoDec 8, 2006
  2. Eric WongDec 8, 2006
  3. rerere: add clear, diff, and status commandsEric Wong, Dec 8, 2006
  4. rerere: record (or avoid misrecording) resolved, skipped or aborted rebase/amEric Wong, Dec 8, 2006
  5. Jakub NarebskiDec 8, 2006
  6. Eric WongDec 8, 2006
  7. Junio C HamanoDec 9, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.