From: Christian Couder Date: Tue, 27 Mar 2007 07:15:12 GMT Subject: Re: [PATCH] Bisect: add checks at the beginning of "git bisect run". Message-ID: <200703270915.12408.chriscool@tuxfamily.org> In-Reply-To: <7vzm5zs1aq.fsf@assigned-by-dhcp.cox.net> Le mardi 27 mars 2007 07:28, Junio C Hamano a écrit : > Christian Couder writes: > > > > bisect_run () { > > + # Check that we have everything to run correctly. > > + test -d "$GIT_DIR/refs/bisect" || { > > + echo >&2 'You need to start by "git bisect start".' > > + echo >&2 'And then by "git bisect bad" and "git bisect good".' > > + exit 1 > > + } > > + bisect_next_check fail > > + > > I think you shouldn't need the first "test -d blah"; doesn't > "bisect_next_check fail" already give that message? Without the first "test -d blah", if "bisect start" was not already used, then the user will only see : 'You need to give me at least one good and one bad revisions.' And then when using "git bisect good" or "git bisect bad" to give good or bad revision: 'You need to start by "git bisect start" Do you want me to do it for you [Y/n]?' So I thought that it would be better to tell the user upfront everything that should be done. But it's up to you. Thanks, Christian.