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 2222 url ,
2323 rev ,
2424 submodules ? true ,
25+ shallow ? false ,
2526 ...
2627 } @ inp : let
27- isRevGitRef = isGitRef rev ;
28+ isRevGitRef = isGitRef rev != null ;
2829 hasGitRef = inp . ref or null != null ;
2930 in
30- if isRevGitRef == null && isGitRev rev == null
31+ if ! isRevGitRef && isGitRev rev == null
3132 then
3233 throw ''
3334 invalid git rev: ${ rev }
4748 if hasGitRef
4849 then { inherit ( inp ) rev ref ; }
4950 # otherwise check if the rev is a ref, if it is add to ref
50- else if isRevGitRef != null
51+ else if isRevGitRef
5152 then { ref = inp . rev ; }
5253 # if the rev isn't a ref, then it is a rev, so add it there
5354 else { rev = inp . rev ; } ;
5758 ( b . fetchGit
5859 ( refAndRev
5960 // {
60- inherit url submodules ;
61+ inherit url submodules shallow ;
6162 # disable fetching all refs if the source specifies a ref
62- shallow = true ;
6363 allRefs = ! hasGitRef ;
6464 } ) ) ;
6565
7474 b . fetchGit
7575 ( refAndRev
7676 // {
77- inherit url submodules ;
78- shallow = true ;
77+ inherit url submodules shallow ;
7978 allRefs = ! hasGitRef ;
8079 } )
8180 else
You can’t perform that action at this time.
0 commit comments