On Fri, Nov 8, 2013 at 3:14 AM, lingfei ouyang <oylf1...@gmail.com> wrote:
> Hello Konstantin,
> I'm trying to create an Git-extenstion pre-commit hooks and below is what I
> #!/bin/bash -xv
> echo $newrev
> newrev_subject=$(git show -s --pretty=format:$s $newrev)
> echo $newrev_subject
> if [[ $newrev_subject =~ $pattern ]]; then
> echo "Processing..."
> echo "error: commit subject comment's not include VersionOne
> stories,defect number"
> exit 1
> but when I try to commit the changes and I got below output error:
> "C:\Program Files\Git\bin\git.exe" commit -F
> .git/hooks/pre-commit: line 14: conditional binary operator expected
> .git/hooks/pre-commit: line 14: syntax error near `=~'
> .git/hooks/pre-commit: line 14: `if [[ $newrev_subject =~ $pattern ]]; then'
> So could you let me know if anything i did wrong here? Git extentions doesn't
> know bash?
Just wanted to let you know that you can also write Git extensions in
a scripting language such as Python/Ruby/Perl - if you are more
comfortable in one of those. I wrote a small blog post the other day
on using Python .
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/groups/opt_out.