Commit Graph

2259 Commits

Author SHA1 Message Date
Robin Stocker b7f5ed5612 Add Javadoc description for packages
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>
2012-10-31 21:26:22 -07:00
Chris Aniszczyk cda5e861b9 Merge "Refactor ResolveMergerTest to allow testing multiple strategies" 2012-10-30 20:00:14 -04:00
Robin Stocker 54aceb1769 Pull up method for creating DirCacheEntry into RepositoryTestCase
Change-Id: I6e6522289553137df1a46ceeb52f461e9d25a290
2012-10-28 14:25:11 +01:00
Robin Rosenberg 81fa566295 Suppress resource warnings with Java 7
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
2012-10-25 15:17:23 -07:00
Shawn Pearce bc8794eb21 Merge "Extend Javadoc of CheckoutCommand and add examples" 2012-10-25 18:13:56 -04:00
Shawn Pearce 71ac75fea3 Merge "Add a check in fstick that the reference file exists" 2012-10-25 18:01:04 -04:00
Shawn Pearce 4e6e267b8a Merge "Fix for Iff768422c, use offset 0 when going back to work tree iterator" 2012-10-25 17:55:22 -04:00
Robin Rosenberg 243e14d051 Add a check in fstick that the reference file exists
This helps avoiding some stupid thinkos.

Change-Id: I5b386cd9c6bf0e11f270bb2b8cfaac66ce9b341b
2012-10-25 14:48:48 -07:00
Shawn Pearce cd61e85fa1 Merge "Don't allow null name or e-mail in PersonIdent" 2012-10-25 17:19:15 -04:00
Shawn Pearce 88eb017c6c Merge "Fix Javadoc formatting of org.eclipse.jgit.diff package" 2012-10-25 17:16:27 -04:00
Shawn O. Pearce 500becfc63 Merge "Simplify push error message when ref already exists" 2012-10-25 17:15:02 -04:00
Christian Halstrick 37ab3ffdaf Refactor ResolveMergerTest to allow testing multiple strategies
By making use of JUnit Theories and Datapoints ResolveMergerTests is now
capable to run the tests against multiple Merge strategies.

Change-Id: Ifa0075e0a2aca7576ef268291b73fa2f4d79b591
2012-10-25 17:48:39 +02:00
Christian Halstrick b7d2c9a446 Merge "AbstractTreeIterator: Add toString with entry path" 2012-10-22 07:11:01 -04:00
Robin Stocker ad52ec5207 StashCreateCommand: Abort in case of unmerged paths
Bug: 391861
Change-Id: I5f8ffe072c08c8ca2ca6be6b6afa67c8e16a63b6
2012-10-22 11:14:40 +02:00
Robin Stocker f54b74225c AbstractTreeIterator: Add toString with entry path
Helps when debugging tree walking code.

Change-Id: I7ba3846a028a1538787a7d4fbf50f7c487cae6c7
2012-10-20 20:12:25 +02:00
Matthias Sohn 1ff82ca6d0 Update packaging build to use Tycho 0.16
Change-Id: Ie5c2f9d4a3b64fc43d310bec45685970cb227237
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2012-10-19 21:35:13 +02:00
Robin Stocker 8572526765 Extend Javadoc of CheckoutCommand and add examples
Otherwise one has to look at the source to find out how to use the
command.

Change-Id: I074325bf2147aeb6f738a9346a9bb8fc49968929
2012-10-18 14:08:36 +02:00
Shawn O. Pearce 99e9a3bdc6 Simplify push error message when ref already exists
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
2012-10-17 18:04:25 -07:00
Robin Stocker ac81ab4878 Fix Javadoc formatting of org.eclipse.jgit.diff package
Without explicit <p> elements, Javadoc joins all paragraph, resulting in
unreadable Javadoc output, e.g. see here:

http://download.eclipse.org/jgit/docs/jgit-2.1.0.201209190230-r/apidocs/org/eclipse/jgit/diff/MyersDiff.html

Also, <pre> is needed to preserve pre-formatted content.

The reflowing of text was automatically done on save.

Change-Id: Ia02dd6d759ae066700098e22669ef925e3c813b5
2012-10-17 22:09:16 +02:00
Matthias Sohn 52d6482a5b Update jgit's last release version for API change reports
Change-Id: I04b1e8a2d3aa49c45bd7846fa87b9acfa57f8fda
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2012-10-16 11:37:44 +02:00
Christian Halstrick 5fc7bd783b Merge "Add a hint on the purpose of JGitInternalException to the constructor" 2012-10-14 17:06:20 -04:00
Robin Rosenberg 47a9b996c7 Add a hint on the purpose of JGitInternalException to the constructor
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
2012-10-14 20:55:14 +02:00
Robin Stocker c8ed4a5006 RevWalk: Add link to parseHeaders/parseBody in Javadoc of lookupCommit
Change-Id: I7765d1a69d19968ebad603025a9c686f17633ebd
2012-10-13 21:25:29 +02:00
Robin Stocker 6dadc801bd Don't allow null name or e-mail in PersonIdent
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
2012-10-13 18:40:46 +02:00
Matthias Sohn 14164e040c Merge "Make BlameGenerator comments more clear" 2012-10-09 16:51:34 -04:00
Robin Stocker 79f33419ec CommitCommand: Use original author on amend if author is not set
This way, callers don't have to parse author ident of HEAD themselves.

Bug: 362391
Change-Id: I383a817e6ed4707d637c52c007bc7b57728e6c85
2012-10-08 00:31:27 +02:00
Robin Stocker c96b40d592 CommitCommand: Don't allow amending on initial commit
Change-Id: I27b13510eb6756da21d0d359d76031da4a875e28
2012-10-08 00:31:26 +02:00
Matthias Sohn 6da9473fe3 Merge "Add --squash option to org.eclipse.jgit.pgm.Merge" 2012-10-07 17:52:58 -04:00
Tomasz Zarna e8c25a1738 Add --squash option to org.eclipse.jgit.pgm.Merge
Change-Id: Ifd20b6f4731cfa71319145cac7b464aa53db18b8
2012-10-07 23:38:34 +02:00
Robin Rosenberg 45edb41a9e Fix for Iff768422c, use offset 0 when going back to work tree iterator
In Iff768422c the offset used for the content id was fixed to use  the
offset that applied to the dircache iterator. Unfortunately the index
for the dircache content id offset stuck for entries that were not in
the index. Few caller probably cared about that, unless it actually
caused an ArrayIndexOutOfBoundsException.

Change-Id: Ic9f0e77c8ea3a0770d88565e94392e76853e3006
2012-10-06 13:08:16 +02:00
Robin Rosenberg 046a497d77 Fix unstable test
Add more time to a timestamp to safely go beyond the granularity of
the timestamp resolution of the file system. The lowest resolution we
know of is FAT with two second resolution. Then add some to make sure we
are above the limit.

Change-Id: I85c5b07dcdf2d80de41fe9b2354ccc888bad7f1e
2012-10-02 12:46:09 +02:00
Robin Stocker 9fbe88aab1 Update README
Extend introduction, update links and remove outdated information.

Change-Id: I29f4d72c980008b6bebe3b009d58c915cd091b9d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2012-09-28 23:21:22 +02:00
Markus Keller a27c1a6b15 Fix compile error (method not available in 1.5)
Change-Id: I07aca821010daca75a66506b9ca738bc8c262abb
Signed-off-by: Markus Keller <markus_keller@ch.ibm.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2012-09-27 00:17:53 +02:00
Robin Rosenberg 0b19db77cb Merge "Remove unused import introduced with 8f706db5" 2012-09-26 17:41:59 -04:00
Shawn O. Pearce 31261b5c2f Revert "The constructor CmdLineException(String) is deprecated"
This reverts commit 07f9936257.

07f9 seems to require a more recent args4j, but I cannot locate a CQ
that verifies we can use a version more recent then 2.0.12. 2.0.16
has been released, but the Hudson CI instance at Eclipse won't
build it.

Since the commit fixes an issue identified in March but wasn't
actually submitted to the tree until September, we can continue to
ignore whatever the problem is/was until someone can attempt a more
correctly working solution.

Change-Id: I94fa432c219bda21c1126976bb60e5292760092e
2012-09-26 10:20:42 -07:00
Matthias Sohn 5aac542f65 Remove unused import introduced with 8f706db5
Also cleanup wildcards in import statements.

Change-Id: I28c1435ae7482de1209aeefc755a230ef5b8c15d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2012-09-25 23:13:54 +02:00
Christian Halstrick 83e7554e17 Merge "Provide a convenient read() in RepositoryTestCase" 2012-09-25 16:56:58 -04:00
Christian Halstrick 01a33350ee Merge "Add the intended file to avoid breakage" 2012-09-25 16:41:56 -04:00
Robin Stocker 9ea38173cc Provide a convenient read() in RepositoryTestCase
For reading a file by its repository-relative path, analogous to
writeTrashFile.

Change-Id: I112de0d57c2ee1bd425de6cbf561a57fea7147f0
2012-09-25 21:00:57 +02:00
Robin Rosenberg 2531d939e4 Add the intended file to avoid breakage
This case breaks when the default is to disallow empty commits.

Change-Id: Ibc223092eefe9f4b21374717dee5a9399bf890f9
2012-09-25 18:46:41 +02:00
Robin Rosenberg bc66934a83 Merge "Allow @ in branch names and tighten syntax checking" 2012-09-24 14:36:57 -04:00
Robin Rosenberg 2e1d391f62 Merge "FileBasedConfig supports UTF-8 byte order marker" 2012-09-24 14:35:22 -04:00
Robin Rosenberg 13df55a464 Merge "Fix typo in AnyObjectId#abbreviate" 2012-09-24 14:22:24 -04:00
Robin Rosenberg aca8df0425 Merge "Add toString for TrackingRefUpdate" 2012-09-24 14:21:11 -04:00
Marc Strapetz 8f706db56a FileBasedConfig supports UTF-8 byte order marker
Change-Id: I1f5dc07182dbf6bba2a9f4807fdd25b475da4ead
2012-09-24 14:28:15 +02:00
Christian Halstrick 1d08015cad Merge "Refuse to checkout unmerged paths from index" 2012-09-24 05:08:36 -04:00
Robin Stocker 56a0286b28 Fix typo in AnyObjectId#abbreviate
Change-Id: I5796dc81727a8e1923189e9490a55c4af6ad053e
2012-09-24 00:34:33 +02:00
Robin Stocker 85b189fdbe Add toString for TrackingRefUpdate
Makes it much easier to debug the results of
OperationResult#getTrackingRefUpdates (which otherwise requires digging
into a TreeMap structure).

Change-Id: I90da5385ee47c441404728f252eb3a100c48ee1c
2012-09-24 00:01:04 +02:00
Robin Rosenberg 68a91801d7 Comment an empty block which is ok
Change-Id: I552d4481e17a12b0bd707d5386f29026ae0856fb
2012-09-23 23:01:28 +02:00
Robin Rosenberg 22427b748b Remove unnecessary @SuppressWarnings
Change-Id: Ic7b8494713d59574ee8f064a5c1042b48aedf012
2012-09-23 23:00:36 +02:00