Re: [git-users] Question on Git Hooks

2013-11-14 Thread Konstantin Khomoutov
On Wed, 13 Nov 2013 12:00:00 -0500 lingfei ouyang oylf1...@gmail.com wrote: and one more quick question? What is the correct way for define the variable in pre-commit hooks in Git bash so I can using those three variables to run git commands, i.e. git show $newrev git merge-base

Re: [git-users] Question on Git Hooks

2013-11-14 Thread lingfei ouyang
Thanks a lot Konstantin for the information, will doing research on this. On Thu, Nov 14, 2013 at 8:03 AM, Konstantin Khomoutov flatw...@users.sourceforge.net wrote: On Wed, 13 Nov 2013 12:00:00 -0500 lingfei ouyang oylf1...@gmail.com wrote: and one more quick question? What is the

Re: [git-users] Question on Git Hooks

2013-11-14 Thread Konstantin Khomoutov
On Thu, 14 Nov 2013 08:18:56 -0500 lingfei ouyang oylf1...@gmail.com wrote: [...] The problem is that by (stupid) default it's not an error in a POSIX shell to attempt to expand a parameter which does not exist. I mean, if you have a script myscript.sh reading [...] Thanks a lot Konstantin

Re: [git-users] Question on Git Hooks

2013-11-13 Thread lingfei ouyang
Thanks Konstantin, and one more quick question? What is the correct way for define the variable in pre-commit hooks in Git bash so I can using those three variables to run git commands, i.e. git show $newrev git merge-base $oldreve $newrev since what I tried in my bash scripts first to define:

Re: [git-users] Question on Git Hooks

2013-11-07 Thread lingfei ouyang
Hello Konstantin, I'm trying to create an Git-extenstion pre-commit hooks and below is what I got: #!/bin/bash -xv refname=$1 oldrev=$2 newrev=$3 pattern=[A-Z]-[0-9]{5}\: echo $newrev newrev_subject=$(git show -s --pretty=format:$s $newrev) echo $newrev_subject if [[ $newrev_subject =~

Re: [git-users] Question on Git Hooks

2013-11-07 Thread Amit Saha
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 got: #!/bin/bash -xv refname=$1 oldrev=$2 newrev=$3 pattern=[A-Z]-[0-9]{5}\: echo $newrev

Re: [git-users] Question on Git Hooks

2013-10-24 Thread Konstantin Khomoutov
On Mon, 14 Oct 2013 05:50:29 -0700 (PDT) Ling oylf1...@gmail.com wrote: We are going to integrate the Git with VersionOne and also trying to create some hooks that prevent when developers trying to commit/push the changes into the remote repositories, for example: when developer trying to

[git-users] Question on Git Hooks

2013-10-14 Thread Ling
Hello, We are going to integrate the Git with VersionOne and also trying to create some hooks that prevent when developers trying to commit/push the changes into the remote repositories, for example: when developer trying to commit/push the new changes from the local repository into the