summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Prefix an abnormal CLI command termination with 'fatal:'Tomasz Zarna2012-11-155-6/+6
| | | | | Change-Id: I3d257666c6fbed7b238c575808f73ec518e811b9 Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* Merge "CommitCommand: Ensure unmerged paths are added correctly with setOnly"Chris Aniszczyk2012-11-152-23/+82
|\
| * CommitCommand: Ensure unmerged paths are added correctly with setOnlyRobin Stocker2012-11-122-23/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Fix formatting in org.eclipse.jgit.pgm.CLIText"Matthias Sohn2012-11-141-6/+2
|\ \
| * | Fix formatting in org.eclipse.jgit.pgm.CLITextTomasz Zarna2012-11-111-6/+2
| |/ | | | | | | Change-Id: Ia87f28fa440cb354bf591713c8aadbe3969edbf1
* / diff, log -p: do not use outs before it is initializedJonathan Nieder2012-11-142-4/+16
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit caa362f20df1 (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
* Fix redundant null check warning in RepositoryRobin Stocker2012-11-081-1/+1
| | | | | | rev is always null because of `if (rev != null) return ...` above. Change-Id: I8168aefd344e0c4b0c68caea1a3daee66c07173b
* Merge "Add the an event and listener for a dfs PackIndex being loaded."Colby Ranger2012-11-023-0/+143
|\
| * Add the an event and listener for a dfs PackIndex being loaded.Colby Ranger2012-11-023-0/+143
| | | | | | | | | | | | | | The DfsPackFile will fire any static repository listeners on the event just before the PackIndex is loaded. Change-Id: Ie51098106bd5a1a32feae7d2dd068abf02b030ee
* | Add ReflogCommandTest#testAmendReflogTomasz Zarna2012-11-011-0/+32
| | | | | | | | | | | | | | | | 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>
* | ResetCommand: Use DirCacheBuilder in resetIndexRobin Stocker2012-11-012-13/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | ResetCommand: Correctly reset unmerged paths in resetIndexForPathsRobin Stocker2012-11-012-25/+44
|/ | | | | | | | | 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>
* Merge "Add isIndexLoaded() to DfsPackFile."Shawn Pearce2012-11-011-0/+6
|\
| * Add isIndexLoaded() to DfsPackFile.Colby Ranger2012-11-011-0/+6
| | | | | | | | | | | | | | The method reports whether the index file for the pack has been loaded and cached in memory. Change-Id: Ifa8d63f737458e102cb3d28579c9711d46693d17
* | Merge "[blame] Don't pass null to PersonIdent constructor"Shawn Pearce2012-11-011-1/+1
|\ \ | |/ |/|
| * [blame] Don't pass null to PersonIdent constructorRobin Stocker2012-10-291-1/+1
| | | | | | | | | | | | | | | | The API was changed to not allow null values anymore with I0ac994ae8e47789d38f7c6e6db55d482f0f1bac3, leading to an IAE. Bug: 393054 Change-Id: If33560ae976b46a02ff75b2e4ec05c13a8ad2d41
* | Add Javadoc description for packagesRobin Stocker2012-10-3128-0/+112
| | | | | | | | | | | | | | | | | | 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>
* | Merge "Refactor ResolveMergerTest to allow testing multiple strategies"Chris Aniszczyk2012-10-301-35/+67
|\ \
| * | Refactor ResolveMergerTest to allow testing multiple strategiesChristian Halstrick2012-10-251-35/+67
| | | | | | | | | | | | | | | | | | | | | By making use of JUnit Theories and Datapoints ResolveMergerTests is now capable to run the tests against multiple Merge strategies. Change-Id: Ifa0075e0a2aca7576ef268291b73fa2f4d79b591
* | | Pull up method for creating DirCacheEntry into RepositoryTestCaseRobin Stocker2012-10-286-139/+95
| |/ |/| | | | | Change-Id: I6e6522289553137df1a46ceeb52f461e9d25a290
* | Suppress resource warnings with Java 7Robin Rosenberg2012-10-2513-19/+52
| | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Extend Javadoc of CheckoutCommand and add examples"Shawn Pearce2012-10-251-10/+96
|\ \
| * | Extend Javadoc of CheckoutCommand and add examplesRobin Stocker2012-10-181-10/+96
| | | | | | | | | | | | | | | | | | | | | Otherwise one has to look at the source to find out how to use the command. Change-Id: I074325bf2147aeb6f738a9346a9bb8fc49968929
* | | Merge "Add a check in fstick that the reference file exists"Shawn Pearce2012-10-251-0/+2
|\ \ \
| * | | Add a check in fstick that the reference file existsRobin Rosenberg2012-10-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | This helps avoiding some stupid thinkos. Change-Id: I5b386cd9c6bf0e11f270bb2b8cfaac66ce9b341b
* | | | Merge "Fix for Iff768422c, use offset 0 when going back to work tree iterator"Shawn Pearce2012-10-252-0/+43
|\ \ \ \ | |/ / / |/| | |
| * | | Fix for Iff768422c, use offset 0 when going back to work tree iteratorRobin Rosenberg2012-10-062-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Merge "Don't allow null name or e-mail in PersonIdent"Shawn Pearce2012-10-253-38/+47
|\ \ \ \
| * | | | Don't allow null name or e-mail in PersonIdentRobin Stocker2012-10-133-38/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | Merge "Fix Javadoc formatting of org.eclipse.jgit.diff package"Shawn Pearce2012-10-2512-61/+65
|\ \ \ \ \
| * | | | | Fix Javadoc formatting of org.eclipse.jgit.diff packageRobin Stocker2012-10-1712-61/+65
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | Merge "Simplify push error message when ref already exists"Shawn O. Pearce2012-10-255-6/+7
|\ \ \ \ \ | |_|_|_|/ |/| | | |
| * | | | Simplify push error message when ref already existsShawn O. Pearce2012-10-175-6/+7
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Merge "AbstractTreeIterator: Add toString with entry path"Christian Halstrick2012-10-221-0/+5
|\ \ \ \
| * | | | AbstractTreeIterator: Add toString with entry pathRobin Stocker2012-10-201-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Helps when debugging tree walking code. Change-Id: I7ba3846a028a1538787a7d4fbf50f7c487cae6c7
* | | | | StashCreateCommand: Abort in case of unmerged pathsRobin Stocker2012-10-224-0/+61
|/ / / / | | | | | | | | | | | | | | | | Bug: 391861 Change-Id: I5f8ffe072c08c8ca2ca6be6b6afa67c8e16a63b6
* | | | Update packaging build to use Tycho 0.16Matthias Sohn2012-10-191-1/+1
| | | | | | | | | | | | | | | | Change-Id: Ie5c2f9d4a3b64fc43d310bec45685970cb227237 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | Update jgit's last release version for API change reportsMatthias Sohn2012-10-161-1/+1
|/ / / | | | | | | | | | Change-Id: I04b1e8a2d3aa49c45bd7846fa87b9acfa57f8fda Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Merge "Add a hint on the purpose of JGitInternalException to the constructor"Christian Halstrick2012-10-141-0/+4
|\ \ \
| * | | Add a hint on the purpose of JGitInternalException to the constructorRobin Rosenberg2012-10-141-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | RevWalk: Add link to parseHeaders/parseBody in Javadoc of lookupCommitRobin Stocker2012-10-131-0/+3
| |/ / |/| | | | | | | | Change-Id: I7765d1a69d19968ebad603025a9c686f17633ebd
* | | Merge "Make BlameGenerator comments more clear"Matthias Sohn2012-10-091-4/+6
|\ \ \
| * | | Make BlameGenerator comments more clearPatrick Carlson2012-08-171-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The file location of the constructor for BlameGenerator did not specify where the path should be relative from. Fix BlameGenerator comments based on suggestions by Robin Stocker. Change-Id: I3d79db2d2ba4961835fe664ae6178e0bfc97b910
* | | | CommitCommand: Use original author on amend if author is not setRobin Stocker2012-10-082-3/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This way, callers don't have to parse author ident of HEAD themselves. Bug: 362391 Change-Id: I383a817e6ed4707d637c52c007bc7b57728e6c85
* | | | CommitCommand: Don't allow amending on initial commitRobin Stocker2012-10-084-0/+13
| |/ / |/| | | | | | | | Change-Id: I27b13510eb6756da21d0d359d76031da4a875e28
* | | Merge "Add --squash option to org.eclipse.jgit.pgm.Merge"Matthias Sohn2012-10-074-14/+57
|\ \ \ | |_|/ |/| |
| * | Add --squash option to org.eclipse.jgit.pgm.MergeTomasz Zarna2012-10-074-14/+57
| | | | | | | | | | | | Change-Id: Ifd20b6f4731cfa71319145cac7b464aa53db18b8
* | | Fix unstable testRobin Rosenberg2012-10-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Update READMERobin Stocker2012-09-281-32/+31
|/ / | | | | | | | | | | Extend introduction, update links and remove outdated information. Change-Id: I29f4d72c980008b6bebe3b009d58c915cd091b9d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Fix compile error (method not available in 1.5)Markus Keller2012-09-271-1/+1
| | | | | | | | | | Change-Id: I07aca821010daca75a66506b9ca738bc8c262abb Signed-off-by: Markus Keller <markus_keller@ch.ibm.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>