summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm
Commit message (Collapse)AuthorAgeFilesLines
* Fix Mylyn commit message templateMichael Keppler2018-09-231-1/+1
| | | | | | | | The commit message template contains a superfluous blank at the end of the first line, which is deleted by this change. This is only relevant for jgit contributors using Eclipse, not for jgit users. Change-Id: I462deb49c26fb64b3dc2d1d75f1e40ef302b0fc9 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
* Prepare 5.2.0-SNAPSHOT buildsMatthias Sohn2018-09-063-46/+46
| | | | | Change-Id: If8e8ca20e745901a5e0239c16cb4acc7934b4ec8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Deprecate Constants.CHARSET in favor of StandardCharsets.UTF_8David Pursehouse2018-09-045-11/+13
| | | | | Change-Id: I3b748620f067582afef20f144feebe40d0332be2 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Format BUILD files with buildifier 0.15.0David Pursehouse2018-08-301-1/+1
| | | | | Change-Id: I6200b0040d24da86968c688f45a2056343e182be Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Add ls-files CLI commandMatthias Sohn2018-08-283-0/+108
| | | | | | Implement the basic functionality and support the option --help (-h). Change-Id: Ibcdf0c958d0f93b7415d4e591b1455ccba5d95f7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Merge branch 'stable-5.0'Matthias Sohn2018-08-251-11/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.0: Silence API warning for new ObjectIdSerializer introduced in 4.11.1 Ignore API warnings Fix photon target platform to use photon version of org.eclipse.osgi Update Photon orbit repository to R20180606145124 Suppress warning for trying to delete non-empty directory Fix fetching with duplicate ref updates Fetch(Process): should tolerate duplicate refspecs FetchCommandTest: test add/update/delete fetch Change-Id: I9e7fa37b100a7ea3cbe4104802d36c6f38df9e08 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Merge branch 'stable-4.11' into stable-5.0Matthias Sohn2018-08-251-11/+0
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.11: Silence API warning for new ObjectIdSerializer introduced in 4.11.1 Ignore API warnings Fix photon target platform to use photon version of org.eclipse.osgi Update Photon orbit repository to R20180606145124 Suppress warning for trying to delete non-empty directory Fix fetching with duplicate ref updates Fetch(Process): should tolerate duplicate refspecs FetchCommandTest: test add/update/delete fetch Change-Id: I2497f99b7d0686a0e0f773c39c8725e813ce9d4a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * Prepare 4.11.2-SNAPSHOT buildsMatthias Sohn2018-07-313-46/+46
| | | | | | | | | | | | | | | Change-Id: I02630900ab131478b30abe68b2133d2c8a5a67ab Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * JGit v4.11.1.201807311124-rv4.11.1.201807311124-rMatthias Sohn2018-07-313-4/+4
| | | | | | | | | | | | | | | Change-Id: Ic58a916d7e2c380b84690afa5e3517c6c178af8c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | Prepare 5.0.3-SNAPSHOT buildsMatthias Sohn2018-08-013-46/+46
| | | | | | | | | | | | | | | Change-Id: Iae9d763a65481b09af6e19b33e41375f27038357 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | JGit v5.0.2.201807311906-rv5.0.2.201807311906-rMatthias Sohn2018-08-013-4/+4
| | | | | | | | | | | | | | | Change-Id: Iccb98c03a069fee85a52325e1ed22cba8b76bcd8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | Prepare 5.0.2-SNAPSHOT buildsMatthias Sohn2018-06-223-46/+46
| | | | | | | | | | | | | | | Change-Id: I65e83f39a4082278c4cb809dbb08d44a119cebe0 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | JGit v5.0.1.201806211838-rv5.0.1.201806211838-rMatthias Sohn2018-06-223-4/+4
| | | | | | | | | | | | | | | Change-Id: I594cd85d46698953c27da3687e4ec40aeb73b445 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | Prepare 5.0.1-SNAPSHOT buildsMatthias Sohn2018-06-133-46/+46
| | | | | | | | | | | | | | | Change-Id: Iadf12dbdd63ef17c3f712c0fc18495304aa35016 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | JGit v5.0.0.201806131550-rv5.0.0.201806131550-rMatthias Sohn2018-06-133-4/+4
| | | | | | | | | | | | | | | Change-Id: Ia2d548676217250593c3f0c383aec19e12e5e4a4 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | JGit v5.0.0.201806131210-rMatthias Sohn2018-06-133-4/+4
| | | | | | | | | | | | | | | Change-Id: Iedccfcaf57c11822f1faf5d5195357de42b2a14e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | Prepare 5.0.0-SNAPSHOT buildsMatthias Sohn2018-06-053-4/+4
| | | | | | | | | | | | | | | Change-Id: I9acca328146aa7100fbc1b457fcb1f8fd87cf52a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | JGit v5.0.0.201806050710-rc3v5.0.0.201806050710-rc3Matthias Sohn2018-06-053-4/+4
| | | | | | | | | | | | | | | Change-Id: Ic7a6a87dd3a21351e60fbf6cd330456adf1f6800 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | Prepare 5.0.0-SNAPSHOT buildsMatthias Sohn2018-05-303-4/+4
| | | | | | | | | | | | | | | Change-Id: I9c4a0465f8e85041d24da97f4b4c7ad5f5eed3e4 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | JGit v5.0.0.201805301535-rc2v5.0.0.201805301535-rc2Matthias Sohn2018-05-303-4/+4
| | | | | | | | | | | | | | | Change-Id: Ifad678794525c01838b03e52bada66e1c089c5ae Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | Prepare 5.0.0-SNAPSHOT buildsMatthias Sohn2018-05-233-4/+4
| | | | | | | | | | | | | | | Change-Id: Ie343ccf37f46168041046500a2e19acc80814cfe Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | JGit v5.0.0.201805221745-rc1v5.0.0.201805221745-rc1Matthias Sohn2018-05-223-4/+4
| | | | | | | | | | | | | | | Change-Id: Ie2c35fab87f294b00f9754b07b60a848bf256b10 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | pgm: remove explicit version of log4j and slf4j in pom.xmlDavid Pursehouse2018-08-251-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The version is inherited from the master pom.xml so does not need to be explicitly specified, unless the intent is to override the version. This is not the case, though, since the versions are specified with the properties defined in the master pom.xml. Despite the fact that using the properties results in the versions effectively not being overridden, Eclipse still warns about it, seemingly due the fact that a value is given in the version field. Change-Id: I163ede6689b9e2e7dd7b21f22b4068d638fa97aa Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | refactor: simplify collection.toArray()Michael Keppler2018-08-235-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On recent VMs, collection.toArray(new T[0]) is faster than collection.toArray(new T[collection.size()]). Since it is also more readable, it should now be the preferred way of collection to array conversion. https://shipilev.net/blog/2016/arrays-wisdom-ancients/ Change-Id: I80388532fb4b2b0663ee1fe8baa94f5df55c8442 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
* | | Make Reftable seek* and has* method names more consistentMinh Thai2018-07-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the method names more consistent and their semantics simpler: hasRef and seekRef to look up a single exact reference by name and hasRefsByPrefix and seekRefsByPrefix to look up multiple references by name prefix. In particular, splitting hasRef into two separate methods for its different uses makes DfsReftableDatabase.isNameConflicting easier to follow. [jn: fleshed out commit message] Change-Id: I71106068ff3ec4f7e14dd9eb6ee6b5fab8d14d0b Signed-off-by: Minh Thai <mthai@google.com> Signed-off-by: Jonathan Nieder <jrn@google.com>
* | | Seek references by prefix in reftableMinh Thai2018-07-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Reftable implementation of RefDatabase.getRefsByPrefix() should be more performant, as references are filtered directly by prefix; instead of fetching the whole subtree then filter by prefix. Change-Id: If4f5f8c08285ea1eaec9efb83c3d864cea7a1321 Signed-off-by: Minh Thai <mthai@google.com>
* | | Prepare 5.1.0-SNAPSHOT buildsMatthias Sohn2018-05-233-46/+46
|/ / | | | | | | | | Change-Id: I8523a993ae1f7b62573d7547273bc1356bf64fa7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Repository: Deprecate #peel methodDavid Pursehouse2018-05-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Callers should use getRefDatabase().peel(ref) instead since it doesn't swallow the IOException. Adapt all trivial callers to user the alternative. DescribeCommand still uses the deprecated method and is not adapted in this change since it will require more refactoring to add handling of the IOException. Change-Id: I14d4a95a5e0570548753b9fc5c03d024dc3ff832 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | Remove further unnecessary 'final' keywordsHan-Wen Nienhuys2018-05-1820-48/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove it from * package private functions. * try blocks * for loops this was done with the following python script: $ cat f.py import sys import re import os def replaceFinal(m): return m.group(1) + "(" + m.group(2).replace('final ', '') + ")" methodDecl = re.compile(r"^([\t ]*[a-zA-Z_ ]+)\(([^)]*)\)") def subst(fn): input = open(fn) os.rename(fn, fn + "~") dest = open(fn, 'w') for l in input: l = methodDecl.sub(replaceFinal, l) dest.write(l) dest.close() for root, dirs, files in os.walk(".", topdown=False): for f in files: if not f.endswith('.java'): continue full = os.path.join(root, f) print full subst(full) Change-Id: If533a75a417594fc893e7c669d2c1f0f6caeb7ca Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
* | Remove 'final' in parameter listsHan-Wen Nienhuys2018-05-1528-56/+56
| | | | | | | | | | Change-Id: Id924f79c8b2c720297ebc49bf9c5d4ddd6d52547 Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
* | Bazel: Add a target to build jgit commandline toolJonathan Nieder2018-05-021-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This works well enough for basic testing, especially the "jgit daemon" command: $ bazel build org.eclipse.jgit.pgm:jgit INFO: Analysed target //org.eclipse.jgit.pgm:jgit (39 packages loaded). INFO: Found 1 target... Target //org.eclipse.jgit.pgm:jgit up-to-date: bazel-bin/org.eclipse.jgit.pgm/jgit.jar bazel-bin/org.eclipse.jgit.pgm/jgit INFO: Elapsed time: 15.862s, Critical Path: 14.74s INFO: 42 processes: 32 linux-sandbox, 1 local, 9 worker. INFO: Build completed successfully, 60 total actions $ bazel-bin/org.eclipse.jgit.pgm/jgit rev-list HEAD^..HEAD 2>/dev/null e5ed926e02dd29b5e970d421b63b6921cc1800f5 Still to do: - suppress "Failed to load class "org.slf4j.impl.StaticLoggerBinder" output - add org.eclipse.jgit.pgm.test tests to bazel build - supply package information so that "jgit version" can work Change-Id: Ie89872839fa5aae974d5d39b6776b96332b0e83f
* | Rename RefDatabase#getAllRefs to getRefsJonathan Nieder2018-04-295-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is easier to type and makes it clearer that it only returns refs and not the pseudo-refs returned by getAdditionalRefs. It also puts us in a better position to add a method to the Repository class later that delegates to this one without colliding with the existing Repository#getAllRefs method that returns a Map<String, Ref>. While at it, clarify the javadoc of getRefs and hasRefs to make the same point. Suggested-by: David Pursehouse <david.pursehouse@gmail.com> Change-Id: I23497c66ac7b5e0c987b91efbc9e9cc29924ca66 Signed-off-by: Jonathan Nieder <jrn@google.com>
* | RefDatabase: add hasRefs convenience methodDavid Pursehouse2018-04-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Callers can now say: db.getRefDatabase().hasRefs() rather than the more verbose: !db.getRefDatabase().getAllRefs().isEmpty() The default implementation simply uses getAllRefs().isEmpty(), but a derived class could possibly override the method with a more efficient implementation. Change-Id: I5244520708a1a7d9adb351f10e43fc39d98e22a1 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | RefDatabase: Introduce getAllRefs methodDavid Pursehouse2018-04-275-15/+6
| | | | | | | | | | | | | | | | | | | | | | | | Currently to get all refs, callers must use: getRefsByPrefix(ALL) Introduce getAllRefs, which does this, and migrate all existing callers of getRefsByPrefix(ALL). Change-Id: I7b1687c162c8ae836dc7db3ccc7ac847863f691d Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | Remove trivial cases of using deprecated RefDatabase.getRefs()Matthias Sohn2018-04-255-19/+14
| | | | | | | | Change-Id: I2d3e426a3391923f8a690ac68fcc33851f3eb419 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Configure WindowCache settings to use in JGit CLIMatthias Sohn2018-04-131-0/+10
| | | | | | | | | | | | | | Set the same defaults as in EGit. Use mmap to map git packfiles into memory. Change-Id: I7997b9123448a762192d7eeb55e01432549fba98 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Fix API problem filter warningsMatthias Sohn2018-03-251-0/+11
| | | | | | | | | | | | | | | | Silence warnings for bundles which haven't broken API since 4.11 but we increased major version to 5 since we always use the same version for all jgit bundles Change-Id: If4f9a6aa4ef21f9b511946c5fc4bd7c0af6094c4 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | ShowPackDelta: Refactor to use try-with-resourceDavid Pursehouse2018-03-141-7/+8
| | | | | | | | | | | | | | | | Remove the resource warning suppression and refactor the code to open the TemporaryBuffer and InflaterInputStream in a try-with-resource. Change-Id: I3082e5ac7565c5000d5a4364f750dd0a0952fc6e Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | CommandCatalog: Simplify scan method using try-with-resourceDavid Pursehouse2018-03-131-21/+4
| | | | | | | | | | | | | | | | | | The IOExceptions caught in the nested try blocks are all ignored, so we can just wrap them all up into a single try-with-resource block. Change-Id: Id85850b3f54c408af73063220e6fead20cb0fd80 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | Open auto-closeable resources in try-with-resourceDavid Pursehouse2018-03-132-12/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an auto-closeable resources is not opened in try-with-resource, the warning "should be managed by try-with-resource" is emitted by Eclipse. Fix the ones that can be silenced simply by moving the declaration of the variable into a try-with-resource. In cases where we explicitly call the close() method, for example in tests where we are testing specific behavior caused by the close(), suppress the warning. Leave the ones that will require more significant refcactoring to fix. They can be done in separate commits that can be reviewed and tested in isolation. Change-Id: I9682cd20fb15167d3c7f9027cecdc82bc50b83c4 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | Implement --force option in FetchCommand and CLI fetch commandMatthias Sohn2018-03-132-0/+7
| | | | | | | | Change-Id: I42cdb57b8fb54ce466d1958391f12f911045327f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Consistently use Constants.CHARSET rather than StandardCharsets.UTF_8David Pursehouse2018-03-114-9/+9
| | | | | | | | | | Change-Id: I6714fc3666e1bced22abba94ceb700477349586e Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | Prepare 5.0.0-SNAPSHOT buildsMatthias Sohn2018-03-083-46/+46
|/ | | | | Change-Id: I2d2f50ed8a12f310e7cac68eed5536bd460c403f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 4.11.1-SNAPSHOT buildsMatthias Sohn2018-03-083-46/+46
| | | | | Change-Id: Id9aa6b7e8f56de5183b6cd57ef0e790ec9debd4d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v4.11.0.201803080745-rv4.11.0.201803080745-rMatthias Sohn2018-03-083-4/+4
| | | | | Change-Id: Ie24a33bc8a24c30db06fe7b175f405efb95776ec Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* CommandCatalog: Use StandardCharsets.UTF_8David Pursehouse2018-03-071-1/+3
| | | | | Change-Id: I7c3356335cfedd81f663fd528799fc57b95fcf0f Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* DiffAlgorithms: Open Repository in try-with-resourceDavid Pursehouse2018-03-061-4/+1
| | | | | Change-Id: I67cb486283213f8aa964333533c55966518baa36 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* AmazonS3Client: Open Input/OutputStream in try-with-resourceDavid Pursehouse2018-03-051-15/+8
| | | | | Change-Id: I32d4031159dff9005e839d0b53940431cba12beb Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Enable warning for resources not managed by try-with-resourceDavid Pursehouse2018-03-031-1/+1
| | | | | Change-Id: Iefe97de6bdb62af558f1b0e77c9205a9186f9b4c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* LFS: Enable LFS support for the CLI, better error handlingMarkus Duft2018-03-031-0/+3
| | | | | | | | | | Enable LFS support for the CLI by registering the according filters. Errors during filter creation must be propagated up the call stack, as a failure to create a filter should be treated as fatal if the filter is required. Change-Id: I3833757839bdda97cd01b6c21c1613d199e2692d Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com>