[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: commit-msg hook
From: |
Eli Zaretskii |
Subject: |
Re: commit-msg hook |
Date: |
Sat, 11 Apr 2015 19:40:23 +0300 |
> Date: Sat, 11 Apr 2015 08:40:29 -0700
> From: Paul Eggert <address@hidden>
> CC: address@hidden
>
> Eli Zaretskii wrote:
> > the problem with hanging is not due
> > to Gawk, but instead due to 'printf': it doesn't produce the UTF-8
> > encoding of the percent sign
>
> OK, so we're dealing with a broken MS-Windows shell rather than a broken
> MS-Windows gawk. That 'printf' command is there only so that the script can
> be
> pure ASCII, and it's simpler to avoid that nicety. I installed the attached
> patch to try to work around the shell bug.
That hangs as well, and I found out why: Gawk waits for input. (I
don't know why this doesn't work as you intended, seems like another
incompatibility in MSYS Bash.) To fix, replace this line
print_at_sign='{print substr("'$cent_sign'@", 2)}'
with this:
print_at_sign='BEGIN {print substr("'$cent_sign'@", 2)}'
and then even your previous version works.
Sorry for my imperfect debugging, there are too many potentially
problematic constructs in this script, and it's not easy to understand
what exactly misfires, especially when Bash shows me corrupted
non-ASCII strings.
Thanks.
- Re: commit-msg hook, (continued)
- Re: commit-msg hook, Eli Zaretskii, 2015/04/11
- Re: commit-msg hook, Eli Zaretskii, 2015/04/11
- Re: commit-msg hook, Eli Zaretskii, 2015/04/11
- Re: commit-msg hook, Dmitry Gutov, 2015/04/11
- Re: commit-msg hook, Eli Zaretskii, 2015/04/11
- Re: commit-msg hook, Dmitry Gutov, 2015/04/11
- Re: commit-msg hook, Eli Zaretskii, 2015/04/11
- Re: commit-msg hook, Stefan Monnier, 2015/04/11
- Re: commit-msg hook, chad, 2015/04/12
- Re: commit-msg hook, Paul Eggert, 2015/04/11
- Re: commit-msg hook,
Eli Zaretskii <=
- Re: commit-msg hook, Paul Eggert, 2015/04/11
- Re: commit-msg hook, Eli Zaretskii, 2015/04/12
- Re: commit-msg hook, Eli Zaretskii, 2015/04/13
- Re: commit-msg hook, Paul Eggert, 2015/04/13
- Re: commit-msg hook, Eli Zaretskii, 2015/04/13
- Re: commit-msg hook, Paul Eggert, 2015/04/13
- Re: commit-msg hook, Eli Zaretskii, 2015/04/14
- Re: commit-msg hook, Paul Eggert, 2015/04/14
- Re: commit-msg hook, Eli Zaretskii, 2015/04/14
- Re: commit-msg hook, Paul Eggert, 2015/04/14