From: Kirill Smelkov Date: Mon, 22 Mar 2010 11:07:59 GMT Subject: [PATCH 1/3] taskd/clone: Don't forget to use 'git config --add' for multivars setup Message-ID: <9e5d5b9ade49b4b2aa14f67d337961a73b35ae33.1269255835.git.kirr@mns.spb.ru> In-Reply-To: <20100222085029.GA28744@landau.phys.spbu.ru> Neat Trick suggested by Miklos Vajna setups origin remote as '.' and also setups 3 refspecs for remotes.origin.fetch. The trick is nice indeed, but in order to setup config multivar, one have to use explicit --add option for `git config' (*) or else old var value is just replaced. The problem showed in svn-mirror repositories with stale master (was not updating from trunk) and also as lack of branches -- that's understandable -- we had '+refs/remotes/tags/*:refs/tags/*' config last, and tags were working OK. Fix it. (*) explicit --add was needed since 89c4afe0 (Add --add option to git-repo-config) in git.git, which dates to git v1.4.4.2-225-g89c4afe --- taskd/clone.sh | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/taskd/clone.sh b/taskd/clone.sh index 962c526..0f5d6fa 100755 --- a/taskd/clone.sh +++ b/taskd/clone.sh @@ -28,8 +28,8 @@ case "$url" in # Neat Trick suggested by Miklos Vajna GIT_DIR=. git config remote.origin.url . GIT_DIR=. git config remote.origin.fetch +refs/remotes/heads/*:refs/heads/* - GIT_DIR=. git config remote.origin.fetch +refs/remotes/trunk:refs/heads/master - GIT_DIR=. git config remote.origin.fetch +refs/remotes/tags/*:refs/tags/* + GIT_DIR=. git config --add remote.origin.fetch +refs/remotes/trunk:refs/heads/master + GIT_DIR=. git config --add remote.origin.fetch +refs/remotes/tags/*:refs/tags/* GIT_DIR=. git fetch ;; darcs://*) -- 1.7.0.2.284.gafe27d