From 105ba715916215ddf30ecdd1e28859df5425ee6f Mon Sep 17 00:00:00 2001 From: Calvin Spealman Date: Mon, 19 Nov 2007 21:04:44 -0500 Subject: [PATCH] more fixes and better path generation for hooks --- bin/changebranch | 1 - bin/newbranch | 8 +++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/changebranch b/bin/changebranch index 5310b3a..04ad088 100755 --- a/bin/changebranch +++ b/bin/changebranch @@ -3,7 +3,6 @@ CURBRANCH=`currentbranchname` if [ "$CURBRANCH" = "$1" ]; then - echo "Already on branch '$CURBRANCH'." exit fi diff --git a/bin/newbranch b/bin/newbranch index 5bbebff..bc9be9d 100755 --- a/bin/newbranch +++ b/bin/newbranch @@ -11,13 +11,15 @@ if ( git branch -r |grep "[^ ]origin/$1$" ); then exit -1 fi -git branch $1 - # Change to master, stashing any dirty working copy files changebranch master # Create the new branch, pull in any existing commits for it from the central server git branch $1 - changebranch $1 + +# Look for hooks +HOOK_POST_CREATE_BRANCH=./`git rev-parse --show-cdup`.socialgit/hooks/post-create-branch +ls $HOOK_POST_CREATE_BRANCH >/dev/null && $HOOK_POST_CREATE_BRANCH + commitbranch -- 2.11.4.GIT