1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 01:47:01 +03:00

Only format unified diffs when --unified is used.

This commit is contained in:
Rob Rix 2015-12-01 11:24:33 -05:00
parent e8609ba886
commit bfb982f69e

View File

@ -70,7 +70,9 @@ main = do
bContents <- readFile $ sourceB arguments
aTerm <- parseTreeSitterFile aContents
bTerm <- parseTreeSitterFile bContents
unified (interpret comparable aTerm bTerm) aContents bContents
case output arguments of
Unified -> unified (interpret comparable aTerm bTerm) aContents bContents
Split -> return mempty
ByteString.putStr output where
opts = info (helper <*> arguments)
(fullDesc <> progDesc "Diff some things" <> header "semantic-diff - diff semantically")