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:
parent
e8609ba886
commit
bfb982f69e
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user