@@ -107,7 +115,11 @@ bisect_start() { then # Reset to the rev from where we started. start_head=$(cat "$GIT_DIR/BISECT_START")- git checkout "$start_head" -- || exit+ if test "$BISECT_MODE" = "--no-checkout"; then+ git update-ref --no-deref HEAD "$start_head"+ else+ git checkout "$start_head" --+ fi
Just a minor worry but I would not be surprised if somebody's "test"
implementation barfs upon:
test "--no-checkout" = "--no-checkout"
mistaking the string with a dash at the beginning as an option unknown to
it. That is why we often have "z$variable" in our comparison, like so:
if test "z$BISECT_MODE" = "z--no-checkout"
then
git update-ref --no-deref BISECT_HEAD "$start_head"
else
git checkout "$start_head" --
fi
From: Jonathan Nieder <hidden> Date: 2016-06-15 22:51:44
Junio C Hamano wrote:
Just a minor worry but I would not be surprised if somebody's "test"
implementation barfs upon:
test "--no-checkout" = "--no-checkout"
mistaking the string with a dash at the beginning as an option unknown to
it. That is why we often have "z$variable" in our comparison, like so:
if test "z$BISECT_MODE" = "z--no-checkout"
Hmm.
$ git grep -e 'test "\$' | wc -l
712
$ git grep -e 'test ".\$' | wc -l
183
We are very inconsistent about such usage, generally, and of course
POSIX is very clear about the 'z' not being needed in a three-argument
"test" used for string comparison. Is there any platform that is
usable for git (e.g., that implements "$( ... )") and has that
problem?
From: Jon Seymour <hidden> Date: 2016-06-15 22:51:44
On Thu, Aug 4, 2011 at 4:57 AM, Jonathan Nieder [off-list ref] wrote:
Junio C Hamano wrote:
quoted
Just a minor worry but I would not be surprised if somebody's "test"
implementation barfs upon:
test "--no-checkout" = "--no-checkout"
mistaking the string with a dash at the beginning as an option unknown to
it. That is why we often have "z$variable" in our comparison, like so:
if test "z$BISECT_MODE" = "z--no-checkout"
Hmm.
$ git grep -e 'test "\$' | wc -l
712
$ git grep -e 'test ".\$' | wc -l
183
We are very inconsistent about such usage, generally, and of course
POSIX is very clear about the 'z' not being needed in a three-argument
"test" used for string comparison. Is there any platform that is
usable for git (e.g., that implements "$( ... )") and has that
problem?
From: Jonathan Nieder <hidden> Date: 2016-06-15 22:51:44
Jon Seymour wrote:
On Thu, Aug 4, 2011 at 4:57 AM, Jonathan Nieder [off-list ref] wrote:
quoted
We are very inconsistent about such usage, generally, and of course
POSIX is very clear about the 'z' not being needed in a three-argument
"test" used for string comparison. Is there any platform that is
usable for git (e.g., that implements "$( ... )") and has that
problem?
Thanks. Applied.
Hm --- I was just asking a question, not meant to be rhetorical. I
guess the question was applied, or that you inferred some patch from
it. :)