aboutsummaryrefslogtreecommitdiff
path: root/bootstrap/src
diff options
context:
space:
mode:
authorLKedward <laurence.kedward@bristol.ac.uk>2020-09-19 13:15:02 +0100
committerLKedward <laurence.kedward@bristol.ac.uk>2020-09-19 13:31:47 +0100
commita110523b8ff0eec8229554917909d4ab05690ea6 (patch)
tree3ac86d0bd0254924a231494c3c349e4d817b9e02 /bootstrap/src
parent15501eabc809a6b05cef2430d15bc76cc7ca1b27 (diff)
parent898a4efcfd8a3ab47e79b36a36fd6497777a4d5d (diff)
downloadfpm-a110523b8ff0eec8229554917909d4ab05690ea6.tar.gz
fpm-a110523b8ff0eec8229554917909d4ab05690ea6.zip
Merge remote-tracking branch 'upstream/master' into recursive_discovery
Diffstat (limited to 'bootstrap/src')
-rw-r--r--bootstrap/src/Fpm.hs14
1 files changed, 9 insertions, 5 deletions
diff --git a/bootstrap/src/Fpm.hs b/bootstrap/src/Fpm.hs
index fdd83d9..d9de668 100644
--- a/bootstrap/src/Fpm.hs
+++ b/bootstrap/src/Fpm.hs
@@ -617,19 +617,23 @@ fetchDependency name version = do
undefined
GitVersion versionSpec -> do
system
- ("git clone " ++ gitVersionSpecUrl versionSpec ++ " " ++ clonePath)
+ ("git init " ++ clonePath)
case gitVersionSpecRef versionSpec of
- Just ref -> withCurrentDirectory clonePath $ do
+ Just ref -> do
system
- ( "git checkout "
+ ("git -C " ++ clonePath ++ " fetch " ++ gitVersionSpecUrl versionSpec ++ " "
++ (case ref of
Tag tag -> tag
Branch branch -> branch
Commit commit -> commit
)
)
- return (name, clonePath)
- Nothing -> return (name, clonePath)
+ Nothing -> do
+ system
+ ("git -C " ++ clonePath ++ " fetch " ++ gitVersionSpecUrl versionSpec)
+ system
+ ("git -C " ++ clonePath ++ " checkout -qf FETCH_HEAD")
+ return (name, clonePath)
PathVersion versionSpec -> return (name, pathVersionSpecPath versionSpec)
{-