1
1
mirror of https://github.com/nmattia/niv.git synced 2024-10-06 12:27:35 +03:00

Skip git checkout

This commit is contained in:
Nicolas Mattia 2020-08-03 17:51:12 +02:00
parent 239b7711d1
commit f2f464929b

View File

@ -155,8 +155,7 @@ latestRevInfo repo mref = runGits $ \git -> do
void $ git ["remote", "add", "origin", repo]
ref <- maybe (git ["remote", "show", "origin"] >>= findRef) pure mref
void $ git ["fetch", "origin", ref, "--depth", "1"]
void $ git ["checkout", ref]
git ["show", "--quiet", "--format=%H%n%aD", ref] >>= \case
git ["show", "--quiet", "--format=%H%n%aD", "origin/" <> ref] >>= \case
[] -> abort "Git did not produce enough output while reading commit information"
[rev, dte] -> do
unless (isRev rev) $ do