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:
parent
239b7711d1
commit
f2f464929b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user