From: Christian Couder Date: Fri, 26 Jun 2015 04:11:57 GMT Subject: Re: [PATCH v9 4/5] bisect: add the terms old/new Message-ID: In-Reply-To: <1435258257-29047-5-git-send-email-Matthieu.Moy@imag.fr> On Thu, Jun 25, 2015 at 8:50 PM, Matthieu Moy wrote: [...] > @@ -178,7 +183,7 @@ bisect_start() { > } && > git rev-parse --sq-quote "$@" >"$GIT_DIR/BISECT_NAMES" && > eval "$eval true" && > - if test $revision_seen -eq 1 && test ! -s "$GIT_DIR/BISECT_TERMS" > + if test $must_write_terms -eq 1 && test ! -s "$GIT_DIR/BISECT_TERMS" > then > echo "$NAME_BAD" >"$GIT_DIR/BISECT_TERMS" && > echo "$NAME_GOOD" >>"$GIT_DIR/BISECT_TERMS" You are writing BISECT_TERMS here... > @@ -543,14 +548,22 @@ check_and_set_terms () { > fi > NAME_BAD="bad" > NAME_GOOD="good" ;; > + new|old) > + if ! test -s "$GIT_DIR/BISECT_TERMS" > + then > + echo "new" >"$GIT_DIR/BISECT_TERMS" && > + echo "old" >>"$GIT_DIR/BISECT_TERMS" > + fi > + NAME_BAD="new" > + NAME_GOOD="old" ;; ...and here nearly in the same way. So perhaps you could use a function like: write_bisect_terms() { if test ! -s "$GIT_DIR/BISECT_TERMS" then echo "$NAME_BAD" >"$GIT_DIR/BISECT_TERMS" && echo "$NAME_GOOD" >>"$GIT_DIR/BISECT_TERMS" fi }