From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Couder Subject: Re: [PATCH v8 4/7] bisect: introduce --no-checkout, --update-ref= support into porcelain. Date: Sun, 31 Jul 2011 22:07:58 +0200 Message-ID: <201107312207.58818.chriscool@tuxfamily.org> References: <1312113321-28760-1-git-send-email-jon.seymour@gmail.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: Christian Couder , git@vger.kernel.org, gitster@pobox.com, j6t@kdbg.org, jnareb@gmail.com To: Jon Seymour X-From: git-owner@vger.kernel.org Sun Jul 31 22:08:16 2011 Return-path: Envelope-to: gcvg-git-2@lo.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QncJ4-0001GA-SZ for gcvg-git-2@lo.gmane.org; Sun, 31 Jul 2011 22:08:15 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752363Ab1GaUIL (ORCPT ); Sun, 31 Jul 2011 16:08:11 -0400 Received: from smtp3-g21.free.fr ([212.27.42.3]:43168 "EHLO smtp3-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752289Ab1GaUII (ORCPT ); Sun, 31 Jul 2011 16:08:08 -0400 Received: from style.localnet (unknown [82.243.130.161]) by smtp3-g21.free.fr (Postfix) with ESMTP id 355BEA62A1; Sun, 31 Jul 2011 22:08:00 +0200 (CEST) User-Agent: KMail/1.13.6 (Linux/2.6.38-8-generic; KDE/4.6.2; x86_64; ; ) In-Reply-To: Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On Sunday 31 July 2011 21:40:35 Jon Seymour wrote: > On Mon, Aug 1, 2011 at 5:21 AM, Christian Couder > > wrote: > > On Sun, Jul 31, 2011 at 1:55 PM, Jon Seymour wrote: > >> + if test -n "$BISECT_UPDATE_REF"; then > >> + eval="$eval echo '$BISECT_UPDATE_REF' > > >> '$GIT_DIR/BISECT_UPDATE_REF';" + fi > > > > I don't like this very much. In fact I realize that the eval thing we > > use is buggy because the result of 'eval "eval"' will be the result of > > the last command in "eval", so we won't detect if one of the first > > command in "eval" failed. > > How about I fix the eval stitching so that it uses && rather than ; to > connect each statement with a final true at the end so there is no > dangling &&? Yeah, please fix it in a separate bug fix patch. > > So perhaps something like: > > > > eval "$eval" && > > + ( test -n "$BISECT_UPDATE_REF" || echo "$BISECT_UPDATE_REF" > > > "$GIT_DIR/BISECT_UPDATE_REF" ) && > > echo "git bisect start$orig_args" >>"$GIT_DIR/BISECT_LOG" || exit > > Probably this would be better :-) > > ( test -z "$BISECT_UPDATE_REF" || echo "$BISECT_UPDATE_REF" > > "$GIT_DIR/BISECT_UPDATE_REF" ) && Yeah :-) Thanks, Christian. PS: sorry I replied to you only previously