]> source.dussan.org Git - jgit.git/commit
Make output stream optional in DiffCommand 08/5908/2
authorKevin Sawicki <kevin@github.com>
Wed, 9 May 2012 22:19:04 +0000 (00:19 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Wed, 9 May 2012 22:19:04 +0000 (00:19 +0200)
commit6ebc477c0b6a209ec9bd1a8bcce796d04ca66966
treeb2edc4fc3c525eaa126300567688bd4d60025a22
parentc403d0b1873c96782eb0dbe02a14c34b82f7fce3
Make output stream optional in DiffCommand

Use the NullOutputStream.INSTANCE value when the
configured output stream is null or the command is
configured to only show name and status.

Also only set the context and prefix options if
formatting is actually being performed.

Bug: 377157
Change-Id: I333cfcc82ee746f3c6a8e94c09dcc803ffbb4b3a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/DiffCommandTest.java
org.eclipse.jgit/src/org/eclipse/jgit/api/DiffCommand.java