First I think the '#' is a leftover, second this is now a bashism.
Signed-off-by: Bert Wesarg <redacted>
---
hooks/pre-commit.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
On Wed, Mar 25, 2009 at 12:43:04PM +0100, Bert Wesarg wrote:
First I think the '#' is a leftover, second this is now a bashism.
according to bash(1):
If pattern begins with #, it must match at the beginning of the
expanded value of parameter.
And I noticed, too, that this is a bashism. Using dash it fails, even
with your patch.
I would prefer to really fix it now.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
if head_=$(git symbolic-ref -q HEAD); then
case "$head_" in
refs/heads/*)
- git rev-parse -q --verify "${head_/#refs\/heads/refs\/top-bases}" >/dev/null || exit 0;;
+ git rev-parse -q --verify "${head_/refs\/heads/refs\/top-bases}" >/dev/null || exit 0;;
git rev-parse -q --verify "refs/top-bases${head_#refs/heads}" >/dev/null || exit 0;;
should work.
But I'm too tired to make a patch now. That probably would only result
in more crap...
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
git rev-parse -q --verify "refs/top-bases/${head_##refs/heads/}" >/dev/null || exit 0;;
This turns e.g. refs/heads/foo into foo and prepends
refs/top-bases/, which should be the same effect, assuming that the
variable's value contains nothing else but the ref's path.
--
.''`. martin f. krafft <madduck@d.o> Related projects:
: :' : proud Debian developer http://debiansystem.info
`. `'` http://people.debian.org/~madduckhttp://vcs-pkg.org
`- Debian - when you have better things to do than fixing systems
logik ist analsadismus: gedanken werden gewaltsam
durch einen engen gang gepreßt.
-- frei nach lacan
This was introduced in fcb488d51e72c7414f9beb40ad06bf529b8b38dc.
A similar fix was suggested by martin f krafft, too.
Reported-by: Bert Wesarg <redacted>
Signed-off-by: Uwe Kleine-König <redacted>
---
Hello,
this should fix the issue now.
If I don't get negative feed back I will push this change later today.
I'm open for acks, too.
Best regards and thanks
Uwe
hooks/pre-commit.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
Hello,
this should fix the issue now.
If I don't get negative feed back I will push this change later today.
I'm open for acks, too.
Best regards and thanks
Uwe
hooks/pre-commit.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Linux Solutions for Science and Industry | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |