Note the the settings are slightly less restrictive for test bundles.
-Also cleanup a couple of malformed javadocs
-Update compiler warnings/errors to include default values from Juno
-We now flag diagnosed null dereference as error. We didn't do that
earlier because of some false positives.
Change-Id: I58386d63164e65d3d8d1998da3390d99bdc7381a
Signed-off-by: Chris Aniszczyk <zx@twitter.com>
This behavior was defined in the Javadoc of PathEdit, but not actually
implemented.
It's necessary when one wants to use a PathEdit to check out a specific
stage in apply.
Bug: 390147
Change-Id: Iaed5cf60c554fc17e6c4d188caf4f0231da920d0
Signed-off-by: Chris Aniszczyk <zx@twitter.com>
Change-Id: I458167739210214fa54c4b3d62fac5abc82f96f7
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Signed-off-by: Chris Aniszczyk <zx@twitter.com>
The test checks if an error is thrown when trying to create the same tag
for the second time.
Change-Id: I4ed2f6c997587f0ea23bd26a32fb64a2d48a980e
Signed-off-by: Chris Aniszczyk <zx@twitter.com>
Since commit caa362f20d (Check for write errors in standard out and
exit with error, 2012-09-14), running "jgit diff" results in a
NullPointerException:
| $ jgit diff
| java.lang.NullPointerException
| at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
| at java.io.BufferedOutputStream.write(BufferedOutputStream.java:126)
| at org.eclipse.jgit.diff.DiffFormatter.format(DiffFormatter.java:688)
| at org.eclipse.jgit.diff.DiffFormatter.format(DiffFormatter.java:630)
| at org.eclipse.jgit.diff.DiffFormatter.format(DiffFormatter.java:616)
| at org.eclipse.jgit.diff.DiffFormatter.format(DiffFormatter.java:600)
| at org.eclipse.jgit.pgm.Diff.run(Diff.java:211)
| at org.eclipse.jgit.pgm.TextBuiltin.execute(TextBuiltin.java:166)
| at org.eclipse.jgit.pgm.Main.execute(Main.java:200)
| at org.eclipse.jgit.pgm.Main.run(Main.java:120)
| at org.eclipse.jgit.pgm.Main.main(Main.java:94)
That patch replaced most uses of System.out with a wrapper, with
changes like the following:
class Diff extends TextBuiltin {
private final DiffFormatter diffFmt = new DiffFormatter( //
- new BufferedOutputStream(System.out));
+ new BufferedOutputStream(outs));
outs is not set for TextBuiltin objects until init() has been run.
Moving the initialization to after the super.init() call gets
"jgit diff" and "jgit log -p" working well again.
Change-Id: I80fcf259c4fb733990bd16e52bcf94e66d820826
With bug 391855, PathEdit will be changed to apply an edit for each
stage. With that, CommitCommand would no longer work correctly when
committing an unmerged path.
This changes it to use a DirCacheBuilder which allows us to correctly
replace the entries for the three stages with one, which is not possible
with PathEdit.
Bug: 391859
Change-Id: I6dc180aec7e2cbf8d1e91f50482c95bc420f79de
The DfsPackFile will fire any static repository listeners on the event
just before the PackIndex is loaded.
Change-Id: Ie51098106bd5a1a32feae7d2dd068abf02b030ee
Add a test for reflog with an amend commit and add assertions for
branch comments
Change-Id: Ie44076ff1abf1f8954b85d8c74ac6cb41ab789cb
Signed-off-by: Chris Aniszczyk <zx@twitter.com>
With bug 391855, DirCacheEditor's PathEdit will be applied for each
stage. For an unmerged path, this would result in 3 equal entries for
the same path.
By using a DirCacheBuilder, the code is simpler and does not have the
above problem with unmerged paths.
Bug: 391860
Change-Id: I785deeaeb8474f8c7a7fbc9ef00d3131fac87e41
Signed-off-by: Chris Aniszczyk <zx@twitter.com>
The previous implementation used a PathEdit, which does not reset the
stage of the entry.
Bug: 391860
Change-Id: If26d3a35abfee85424ad69de724f06a28b6e9efb
Signed-off-by: Chris Aniszczyk <zx@twitter.com>
These appear as descriptions in the index, see here (currently empty):
http://download.eclipse.org/jgit/docs/latest/apidocs/
Change-Id: If7996deef30ae688bade8b3ad6b19547ca3d8b50
Signed-off-by: Chris Aniszczyk <zx@twitter.com>
The API was changed to not allow null values anymore with
I0ac994ae8e47789d38f7c6e6db55d482f0f1bac3, leading to an IAE.
Bug: 393054
Change-Id: If33560ae976b46a02ff75b2e4ec05c13a8ad2d41
For streams that should not be closed, i.e. don't own an underlying
stream, and in-memory streams that do not need to be closed we just
suppress the warning. This mostly apply to test cases. GC is enough.
For streams with external resources (i.e. files) we add the necessary
call to close().
Change-Id: I4d883ba2e7d07f199fe57ccb3459ece00441a570
By making use of JUnit Theories and Datapoints ResolveMergerTests is now
capable to run the tests against multiple Merge strategies.
Change-Id: Ifa0075e0a2aca7576ef268291b73fa2f4d79b591
If a client attempts to create a branch that already exists on the
remote side, tell them "already exists" rather than repeat lots of
information about the reference. Previously the error looked like:
! [remote rejected] tags/1.3.1 -> 1.3.1 (Ref Ref[refs/tags/1.3.1=e3857ee05...] already exists)
Now it will simply say:
! [remote rejected] tags/1.3.1 -> 1.3.1 (already exists)
Change-Id: I96fc67ca8b650052de6e662449a3c5bc8bbc010b
In code review we often see uses of JGitInternalException where a high
level GitAPIException would be more appropriate. Hopefully the word
low-level in the constructor comment will lead to fewer such cases.
Change-Id: Id5ec7897535f6c5c5f0bd153fe0ff15c65083474
toExternalString, equals and hashCode don't expect them to be null, so
explicitly disallow it in the constructor.
Also fix the documentation of setAuthor and setCommitter in
CommitCommand when specifying name and email as separate arguments.
Bug: 352984
Change-Id: I0ac994ae8e47789d38f7c6e6db55d482f0f1bac3