File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -617,19 +617,23 @@ fetchDependency name version = do
617
617
undefined
618
618
GitVersion versionSpec -> do
619
619
system
620
- (" git clone " ++ gitVersionSpecUrl versionSpec ++ " " ++ clonePath)
620
+ (" git init " ++ clonePath)
621
621
case gitVersionSpecRef versionSpec of
622
- Just ref -> withCurrentDirectory clonePath $ do
622
+ Just ref -> do
623
623
system
624
- ( " git checkout "
624
+ (" git -C " ++ clonePath ++ " fetch " ++ gitVersionSpecUrl versionSpec ++ " "
625
625
++ (case ref of
626
626
Tag tag -> tag
627
627
Branch branch -> branch
628
628
Commit commit -> commit
629
629
)
630
630
)
631
- return (name, clonePath)
632
- Nothing -> return (name, clonePath)
631
+ Nothing -> do
632
+ system
633
+ (" git -C " ++ clonePath ++ " fetch " ++ gitVersionSpecUrl versionSpec)
634
+ system
635
+ (" git -C " ++ clonePath ++ " checkout -qf FETCH_HEAD" )
636
+ return (name, clonePath)
633
637
PathVersion versionSpec -> return (name, pathVersionSpecPath versionSpec)
634
638
635
639
{-
You can’t perform that action at this time.
0 commit comments