resolve-trivial-conflicts 0.3.2 → 0.3.2.1
raw patch · 2 files changed
+9/−5 lines, 2 files
Files
resolve-trivial-conflicts.cabal view
@@ -2,7 +2,7 @@ -- further documentation, see http://haskell.org/cabal/users-guide/ name: resolve-trivial-conflicts-version: 0.3.2+version: 0.3.2.1 synopsis: Remove trivial conflict markers in a git repository description: Remove trivial conflict markers in a git repository homepage: https://github.com/ElastiLotem/resolve-trivial-conflicts
resolve_trivial_conflicts.hs view
@@ -297,13 +297,17 @@ FilePath -> (FilePath -> Maybe FilePath -> Maybe FilePath -> IO b) -> IO b withAllStageFiles path action = do let stdin = ""- [baseTmp, localTmp, remoteTmp] <-+ [baseTmpRaw, localTmpRaw, remoteTmpRaw] <- take 3 . words <$> readProcess "git" ["checkout-index", "--stage=all", "--", path] stdin+ cdup <-+ takeWhile (/= '\0') . stripNewline <$>+ readProcess "git" ["rev-parse", "--show-cdup"] stdin let maybePath "." = Nothing- maybePath p = Just p- let mLocalTmp = maybePath localTmp- mRemoteTmp = maybePath remoteTmp+ maybePath p = Just (cdup </> p)+ let mLocalTmp = maybePath localTmpRaw+ mRemoteTmp = maybePath remoteTmpRaw+ baseTmp = cdup </> baseTmpRaw action baseTmp mLocalTmp mRemoteTmp `E.finally` do removeFile baseTmp