Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH git-r3 10/10] Use '+'-refs to force updates on fetch.
Date: Wed, 26 Feb 2014 12:04:35
Message-Id: 1393415954-19313-10-git-send-email-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCHES git-r3] Clean up and different clone type support by "Michał Górny"
1 This is required to allow non-forward updates with upstreams that don't
2 like linear or predictable history.
3 ---
4 eclass/git-r3.eclass | 10 +++++-----
5 1 file changed, 5 insertions(+), 5 deletions(-)
6
7 diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass
8 index 33e66a6..af84ca6 100644
9 --- a/eclass/git-r3.eclass
10 +++ b/eclass/git-r3.eclass
11 @@ -452,14 +452,14 @@ git-r3_fetch() {
12 fetch_command+=(
13 --prune
14 # mirror the remote branches as local branches
15 - "refs/heads/*:refs/heads/*"
16 + "+refs/heads/*:refs/heads/*"
17 # pull tags explicitly in order to prune them properly
18 - "refs/tags/*:refs/tags/*"
19 + "+refs/tags/*:refs/tags/*"
20 # notes in case something needs them
21 - "refs/notes/*:refs/notes/*"
22 + "+refs/notes/*:refs/notes/*"
23 # and HEAD in case we need the default branch
24 # (we keep it in refs/git-r3 since otherwise --prune interferes)
25 - HEAD:refs/git-r3/HEAD
26 + "+HEAD:refs/git-r3/HEAD"
27 )
28 else # single or shallow
29 local fetch_l fetch_r
30 @@ -502,7 +502,7 @@ git-r3_fetch() {
31 fi
32
33 fetch_command+=(
34 - "${fetch_l}:${fetch_r}"
35 + "+${fetch_l}:${fetch_r}"
36 )
37 fi
38
39 --
40 1.8.3.2