[RFC/PATCH] Bisect: add special treatment for bangs passed to "bisect run".

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Uwe <ukleinek@...>, Junio Hamano <junkio@...>
Cc: <git@...>
Date: Tuesday, May 1, 2007 - 8:17 am

Something like:

 $ git bisect run ! grep string my_file

does not work right now probably because '!' is a shell keyword.

(This simple script shows the problem:

 $ echo "#"\!"/bin/sh" > ./simple_test.sh
 $ echo "echo \"running:\" \"\$@\"" >> ./simple_test.sh
 $ echo "\"\$@\"" >> ./simple_test.sh
 $ chmod +x ./simple_test.sh
 $ ./simple_test.sh ! grep foo bar.txt
 running: ! grep foo bar.txt
 ./simple_test.sh: line 3: !: command not found
)

This patch tries to work around this problem by counting how
many bangs are passed at the beginning of the "bisect run"
argument list and changing the exit code accordingly.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---

Hallo Uwe,

Le mardi 1 mai 2007 11:44, Uwe Kleine-K
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC/PATCH] Bisect: add special treatment for bangs passed t..., Christian Couder, (Tue May 1, 8:17 am)