diff options
| author | Mirek Kratochvil <miroslav.kratochvil@uni.lu> | 2025-07-23 10:50:17 +0200 |
|---|---|---|
| committer | Mirek Kratochvil <miroslav.kratochvil@uni.lu> | 2025-07-23 10:50:17 +0200 |
| commit | b52b106ac50a0100e41843e2bd2edcbb74a10b6e (patch) | |
| tree | 5eafe6ff4c01506af70ca11477f29aa8d70c9c1d /Main.hs | |
| parent | 259ad6101b71e764459171122a3915ace74f6590 (diff) | |
| download | werge-b52b106ac50a0100e41843e2bd2edcbb74a10b6e.tar.gz werge-b52b106ac50a0100e41843e2bd2edcbb74a10b6e.tar.bz2 | |
allow picking patches from files
Diffstat (limited to 'Main.hs')
| -rw-r--r-- | Main.hs | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -344,7 +344,10 @@ runCmd CmdPatch {..} cfg = do withSystemTempDirectory "werge-patch" $ \workdir -> do let f = workdir </> "file" bracketFile patchMy ReadMode $ \h -> hSplitToFile cfg h f - _ <- runPatch f stdin + _ <- + case patchInput of + Nothing -> runPatch f stdin + Just path -> bracketFile path ReadMode $ runPatch f conflicted <- pmerge f >>= format cfg stdout -- TODO try to resolve more? if conflicted then exitWith (ExitFailure 1) |
