Changeset 3449 for trunk/UTIL/pre-push
- Timestamp:
- Oct 3, 2024, 6:48:34 PM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UTIL/pre-push
r3440 r3449 4 4 # check if on master 5 5 local_branch=$(git branch --show-current) 6 7 echo Branch: $local_branch 8 9 echo done 6 10 if [ ${local_branch} != "master" ]; then 7 11 # exit 0 # if on other branch than master, do not sync with svn 12 use_hook=false 13 while read local_ref local_oid remote_ref remote_oid; do 14 # echo $local_ref $local_oid $remote_ref $remote_oid 15 if test $local_ref = "refs/heads/master"; then 16 use_hook=true 17 fi 18 done 19 if test $use_hook = "false" ;then 20 echo "Sync with svn not necessary, no changes in master to be pushed." 21 echo "Continuing with push on $local_branch." 22 exit 0 # push only on local branch 23 fi 8 24 git checkout master 9 git pull origin master25 git pull --rebase origin master 10 26 fi 27 11 28 # git update-ref refs/remotes/git-svn refs/remotes/origin/master # what's this supposed to do? 12 29
Note: See TracChangeset
for help on using the changeset viewer.