1 |
This is required to support submodules transparently since they always |
2 |
fetch by commit hash. |
3 |
--- |
4 |
eclass/git-r3.eclass | 9 +++++++-- |
5 |
1 file changed, 7 insertions(+), 2 deletions(-) |
6 |
|
7 |
diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass |
8 |
index c9c2da5..08b8ebb 100644 |
9 |
--- a/eclass/git-r3.eclass |
10 |
+++ b/eclass/git-r3.eclass |
11 |
@@ -449,13 +449,18 @@ git-r3_fetch() { |
12 |
# tag |
13 |
fetch_l=refs/tags/${remote_ref} |
14 |
else |
15 |
- # commit, so we need to fetch the branch |
16 |
- # and guess where it takes us... |
17 |
+ # commit |
18 |
+ # so we need to fetch the branch |
19 |
if [[ ${branch} ]]; then |
20 |
fetch_l=${branch} |
21 |
else |
22 |
fetch_l=HEAD |
23 |
fi |
24 |
+ |
25 |
+ # fetching by commit in shallow mode? can't do. |
26 |
+ if [[ ${EGIT_CLONE_TYPE} == shallow ]]; then |
27 |
+ local EGIT_CLONE_TYPE=single |
28 |
+ fi |
29 |
fi |
30 |
fi |
31 |
|
32 |
-- |
33 |
1.8.3.2 |