Changeset 3575


Ignore:
Timestamp:
Jan 14, 2025, 3:11:01 PM (11 hours ago)
Author:
afalco
Message:

git-svn: added hooks on other operations such as merge and checkout, to synchronize git and svn more often (not just git push).

Unfortunately, "git pull" will still not call the hook if there are no changes on git remote master.
AF

Location:
trunk/UTIL
Files:
4 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UTIL/git_init.sh

    r3445 r3575  
    1414# echo "or download it in the git-trunk/ folder (and link with git-svn)."
    1515
    16 while true; do
    17     read -p "Do you wish to continue? [Y/n] " yn
    18     case $yn in
    19         [Yy]* ) break;;
    20         [Nn]* ) exit;;
    21         * ) break;;
    22     esac
    23 done
     16# while true; do
     17#     read -p "Do you wish to continue? [Y/n] " yn
     18#     case $yn in
     19#         [Yy]* ) break;;
     20#         [Nn]* ) exit;;
     21#         * ) break;;
     22#     esac
     23# done
    2424
    2525# URL=git@gitlab.in2p3.fr:la-communaut-des-mod-les-atmosph-riques-plan-taires/git-trunk.git
     
    4040### users push only commits in sync with svn
    4141
    42 cp UTIL/pre-push .git/hooks
     42# save users hooks just in case
     43echo "Saving old hooks in .git/hooks/save ..."
     44mkdir -p .git/hooks
     45if [ -d .git/hooks ];then
     46    mkdir -p .git/hooks/save
     47    mv .git/hooks/p* .git/hooks/save
     48fi
     49echo "Copying lmdz hooks in .git/hooks ..."
     50cd .git/hooks
     51for hook in ../../UTIL/hooks/*; do
     52    file=$(basename $hook)
     53    echo $file
     54    ln -s $hook $file
     55done
    4356
Note: See TracChangeset for help on using the changeset viewer.