From: Matthieu Moy Date: Tue, 09 Jun 2015 06:45:03 GMT Subject: Re: [PATCH 2/4] bisect: replace hardcoded "bad|good" by variables Message-ID: In-Reply-To: <1433794930-5158-2-git-send-email-antoine.delaite@ensimag.grenoble-inp.fr> Antoine Delaite writes: > --- a/git-bisect.sh > +++ b/git-bisect.sh > @@ -32,6 +32,8 @@ OPTIONS_SPEC= > > _x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]' > _x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40" > +NAME_BAD="bad" > +NAME_GOOD="good" I would have written NAME_NEW=bad NAME_OLD=good "old/new" are the generic wording, so I think it would make more sense for the codebase to use it when we don't hardcode old/new. (and the double-quotes are not needed) > @@ -249,8 +254,8 @@ bisect_state() { > bisect_write "$state" "$rev" > done > check_expected_revs $hash_list ;; > - *,bad) > - die "$(gettext "'git bisect bad' can take only one argument.")" ;; > + *,"$NAME_BAD") > + die "$(gettext "'git bisect $NAME_BAD' can take only one argument.")" ;; As Junio mentionned, you'll need an eval_gettext here. -- Matthieu Moy http://www-verimag.imag.fr/~moy/