diff options
| -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") |
