diff options
| author | Joey Hess <joeyh@joeyh.name> | 2016-04-01 18:36:38 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2016-04-01 18:36:38 -0400 |
| commit | ccfdfcab60753eb6eb6ab1c6a6ad6203b8adfdcf (patch) | |
| tree | 7cfb29ca5214b24d837518a104a28df785c7ca6d /src | |
| parent | 503437b676f5c4d41ef41c6de3e3b25045bcc5d7 (diff) | |
fix false positive for out of date message after initial clone from git bundle
Diffstat (limited to 'src')
| -rw-r--r-- | src/wrapper.hs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/wrapper.hs b/src/wrapper.hs index f079eb32..82251dc9 100644 --- a/src/wrapper.hs +++ b/src/wrapper.hs @@ -12,6 +12,7 @@ module Main where import Propellor.Message import Propellor.Bootstrap +import Propellor.Git import Utility.UserInfo import Utility.Monad import Utility.Process @@ -225,10 +226,12 @@ checkRepoUpToDate dotpropellor = whenM (gitbundleavail <&&> dotpropellorpopulate if (headknown == Nothing) then setupUpstreamMaster headrev dotpropellor else do - merged <- not . null <$> - readProcess "git" ["log", headrev ++ "..HEAD", "--ancestry-path"] - unless merged $ - warnoutofdate dotpropellor True + theirhead <- getCurrentGitSha1 =<< getCurrentBranchRef + when (theirhead /= headrev) $ do + merged <- not . null <$> + readProcess "git" ["log", headrev ++ "..HEAD", "--ancestry-path"] + unless merged $ + warnoutofdate dotpropellor True where gitbundleavail = doesFileExist disthead dotpropellorpopulated = doesFileExist (dotpropellor </> "propellor.cabal") |
