From 82f0ba3e09ca73635984d0592bc44fef88b391c3 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Tue, 19 Mar 2013 15:28:11 +0100 Subject: [PATCH] Modification : vm_hosted : rule_git_configure : synchronise au push remotes/master et master. --- vm_hosted | 10 ++++++++++ vm_remote | 1 - 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/vm_hosted b/vm_hosted index 3247eb5..3649341 100755 --- a/vm_hosted +++ b/vm_hosted @@ -35,6 +35,16 @@ rule_git_configure () { tool=$(cd "$tool"; cd -) sudo ln -fns "$tool"/vm_hosted /usr/local/sbin/ sudo ln -fns "$tool"/vm_hosted /usr/local/sbin/vm + sudo install -m 770 /dev/stdin .git/hooks/post-update <<-EOF + #!/bin/sh -efux + case \$1 in + (refs/remotes/master) + cd .. + git --git-dir=\$PWD/.git checkout -f -B master remotes/master + git --git-dir=\$PWD/.git clean -f -d - + ;; + esac + EOF ) } rule_git_reset () { diff --git a/vm_remote b/vm_remote index 3381568..467d528 100755 --- a/vm_remote +++ b/vm_remote @@ -40,7 +40,6 @@ rule_git_push () { # SYNTAX: {host|hosted} $git_push_options cd "$tool" local remote=${1#remote=}; shift GIT_SSH=./lib/ssh git push -v "$remote" "$@" - info "penser à faire : vm_hosted git_reset" ) } -- 2.20.1