File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
lib/internal/fetchers/git Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 22
22
url ,
23
23
rev ,
24
24
submodules ? true ,
25
+ shallow ? false ,
25
26
...
26
27
} @ inp : let
27
- isRevGitRef = isGitRef rev ;
28
+ isRevGitRef = isGitRef rev != null ;
28
29
hasGitRef = inp . ref or null != null ;
29
30
in
30
- if isRevGitRef == null && isGitRev rev == null
31
+ if ! isRevGitRef && isGitRev rev == null
31
32
then
32
33
throw ''
33
34
invalid git rev: ${ rev }
47
48
if hasGitRef
48
49
then { inherit ( inp ) rev ref ; }
49
50
# otherwise check if the rev is a ref, if it is add to ref
50
- else if isRevGitRef != null
51
+ else if isRevGitRef
51
52
then { ref = inp . rev ; }
52
53
# if the rev isn't a ref, then it is a rev, so add it there
53
54
else { rev = inp . rev ; } ;
57
58
( b . fetchGit
58
59
( refAndRev
59
60
// {
60
- inherit url submodules ;
61
+ inherit url submodules shallow ;
61
62
# disable fetching all refs if the source specifies a ref
62
- shallow = true ;
63
63
allRefs = ! hasGitRef ;
64
64
} ) ) ;
65
65
74
74
b . fetchGit
75
75
( refAndRev
76
76
// {
77
- inherit url submodules ;
78
- shallow = true ;
77
+ inherit url submodules shallow ;
79
78
allRefs = ! hasGitRef ;
80
79
} )
81
80
else
You can’t perform that action at this time.
0 commit comments