@@ -64,6 +64,7 @@ import System.Posix (getSymbolicLinkStatus, modificationTime)
6464import System.Process
6565
6666import Development.Placeholders
67+import Obelisk.Command.Utils
6768
6869--TODO: Support symlinked thunk data
6970data ThunkData
@@ -510,12 +511,7 @@ packThunk thunkDir upstream = readThunk thunkDir >>= \case
510511
511512getThunkPtr :: FilePath -> String -> IO ThunkPtr
512513getThunkPtr thunkDir upstream = do
513− --Check whether the working directory is clean
514− statusOutput <- readProcess "hub"
515− [ "-C", thunkDir
516− , "status", "--porcelain", "--ignored" ] ""
517− diffOutput <- readProcess "hub" [ "-C", thunkDir , "diff" ] ""
518− case null statusOutput && null diffOutput of
514+ checkGitCleanStatus thunkDir >>= \case
519515 False -> do
520516 statusDebug <- readProcess "hub"
521517 [ "-C", thunkDir, "status", "--ignored" ] ""