From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.176.0/21 X-Spam-Status: No, score=-3.5 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MSGID_FROM_MTA_HEADER,RP_MATCHES_RCVD shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 From: Eric Wong Subject: Re: [PATCH 1/5] rerere: avoid misrecording on a skipped or aborted rebase/am Date: Fri, 8 Dec 2006 13:28:30 -0800 Message-ID: <20061208212830.GB13944@localdomain> References: <20061205092126.GE27236@soma> <11655749724034-git-send-email-normalperson@yhbt.net> <7v7ix2i0e5.fsf@assigned-by-dhcp.cox.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Date: Fri, 8 Dec 2006 21:28:42 +0000 (UTC) Cc: git@vger.kernel.org Return-path: Envelope-to: gcvg-git@gmane.org Content-Disposition: inline In-Reply-To: <7v7ix2i0e5.fsf@assigned-by-dhcp.cox.net> User-Agent: Mutt/1.5.13 (2006-08-11) Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: Received: from vger.kernel.org ([209.132.176.167]) by dough.gmane.org with esmtp (Exim 4.50) id 1GsnGm-0007wW-IP for gcvg-git@gmane.org; Fri, 08 Dec 2006 22:28:36 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1947271AbWLHV2d (ORCPT ); Fri, 8 Dec 2006 16:28:33 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1947273AbWLHV2d (ORCPT ); Fri, 8 Dec 2006 16:28:33 -0500 Received: from hand.yhbt.net ([66.150.188.102]:48147 "EHLO hand.yhbt.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1947271AbWLHV2d (ORCPT ); Fri, 8 Dec 2006 16:28:33 -0500 Received: from hand.yhbt.net (localhost [127.0.0.1]) by hand.yhbt.net (Postfix) with SMTP id AB4C82DC034; Fri, 8 Dec 2006 13:28:30 -0800 (PST) Received: by hand.yhbt.net (sSMTP sendmail emulation); Fri, 08 Dec 2006 13:28:30 -0800 To: Junio C Hamano Sender: git-owner@vger.kernel.org Junio C Hamano wrote: > Eric Wong 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). --