Changeset 3415 for trunk/UTIL
- Timestamp:
- Aug 21, 2024, 3:46:57 PM (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UTIL/pre-push
r3414 r3415 3 3 4 4 # check if on master 5 if [ $(git branch --show-current) != "master" ]; then 6 exit 0 # if on other branch, do not care about the rest of the hook 7 # git checkout master # ensure mastersync with svn5 local_branch=$(git branch --show-current) 6 if [ ${local_branch} != "master" ]; then 7 git checkout master # ensure master is in sync with svn 8 8 fi 9 9 # git update-ref refs/remotes/git-svn refs/remotes/origin/master # what's this supposed to do? … … 15 15 then 16 16 printf "${RED}You need to install git svn to use this script.${NC}\n" 17 git checkout ${local_branch} 17 18 exit $GITSVN 18 19 fi … … 28 29 then 29 30 echo "${RED}git svn rebase failed.${NC}\n" 31 git checkout ${local_branch} 30 32 exit $REBASED 31 33 fi … … 48 50 then 49 51 printf "${RED}git svn dcommit failed.${NC}\n" 52 git checkout ${local_branch} 50 53 exit $COMMITED 51 54 fi … … 63 66 printf "${RED}And synchronize svn and git.${NC}\n" 64 67 printf "${RED}You will need to push again after.${NC}\n" 68 git checkout ${local_branch} 65 69 exit 1 66 70 fi … … 69 73 70 74 # push only if svn was already up to date with local master 75 git checkout ${local_branch} 71 76 exit 0
Note: See TracChangeset
for help on using the changeset viewer.