[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-dev
Subject:    [gentoo-dev] [PATCH git-r3 10/10] Use '+'-refs to force updates on fetch.
From:       Michał Górny <mgorny () gentoo ! org>
Date:       2014-02-26 11:59:14
Message-ID: 1393415954-19313-10-git-send-email-mgorny () gentoo ! org
[Download RAW message or body]

This is required to allow non-forward updates with upstreams that don't
like linear or predictable history.
---
 eclass/git-r3.eclass | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass
index 33e66a6..af84ca6 100644
--- a/eclass/git-r3.eclass
+++ b/eclass/git-r3.eclass
@@ -452,14 +452,14 @@ git-r3_fetch() {
 			fetch_command+=(
 				--prune
 				# mirror the remote branches as local branches
-				"refs/heads/*:refs/heads/*"
+				"+refs/heads/*:refs/heads/*"
 				# pull tags explicitly in order to prune them properly
-				"refs/tags/*:refs/tags/*"
+				"+refs/tags/*:refs/tags/*"
 				# notes in case something needs them
-				"refs/notes/*:refs/notes/*"
+				"+refs/notes/*:refs/notes/*"
 				# and HEAD in case we need the default branch
 				# (we keep it in refs/git-r3 since otherwise --prune interferes)
-				HEAD:refs/git-r3/HEAD
+				"+HEAD:refs/git-r3/HEAD"
 			)
 		else # single or shallow
 			local fetch_l fetch_r
@@ -502,7 +502,7 @@ git-r3_fetch() {
 			fi
 
 			fetch_command+=(
-				"${fetch_l}:${fetch_r}"
+				"+${fetch_l}:${fetch_r}"
 			)
 		fi
 
-- 
1.8.3.2


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic