summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* JGit v5.0.0.201805301535-rc2v5.0.0.201805301535-rc2Matthias Sohn2018-05-3056-59/+59
| | | | | Change-Id: Ifad678794525c01838b03e52bada66e1c089c5ae Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix description property in feature.properties of pgm source featureMatthias Sohn2018-05-301-1/+1
| | | | | Change-Id: I29c7bf1dc6aaf71542e2529883d44dcd995e17f7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Update SUAMatthias Sohn2018-05-2914-1476/+2183
| | | | | | | | | | | | Following [1] update SUA in license.html [2] and feature.properties [3] [1] https://www.eclipse.org/projects/handbook/#legaldoc-plugins [2] https://www.eclipse.org/legal/epl/notice.html [3] https://www.eclipse.org/legal/epl/feature.properties.txt Bug: 532265 Change-Id: Ia3929808154510ad09ceeead263a3fe0dba9a34a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Don't prune symbolic refs when fetch.prune = trueThomas Wolf2018-05-252-0/+47
| | | | | | | | | | | | | | The canonical implementation also doesn't. Compare current code in remote.c, function get_stale_heads_cb.[1] Not handling symrefs in this case was introduced in canonical git in [2] in 2008. [1] https://github.com/git/git/blob/v2.17.0/remote.c#L2259 [2] https://github.com/git/git/commit/740fdd27f0 Bug: 533549 Change-Id: If348d56bb4a96b8aa7141f7e7b5a0d3dd4e7808b Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* Prepare 5.0.0-SNAPSHOT buildsMatthias Sohn2018-05-2356-59/+59
| | | | | Change-Id: Ie343ccf37f46168041046500a2e19acc80814cfe Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v5.0.0.201805221745-rc1v5.0.0.201805221745-rc1Matthias Sohn2018-05-2256-59/+59
| | | | | Change-Id: Ie2c35fab87f294b00f9754b07b60a848bf256b10 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Merge branch 'master' into stable-5.0Matthias Sohn2018-05-22222-658/+1004
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: DescribeCommand: Refactor to not use deprecated Repository#peel Repository: Deprecate #peel method Repository: Make #exactRef and #findRef final Skip ignored directories in FileTreeIterator Repository: Deprecate getTags method InfoRefsServlet: Refactor to not use deprecated methods RefAdvertiser: Add send(Collection<Ref>) and deprecate send(Map<String, Ref>) Remove deprecated Repository#notifyIndexChanged Implementors should override Repository#notifyIndexChanged(boolean) Revive Repository#notifyIndexChanged() Remove further unnecessary 'final' keywords Execute AdvertiseRefsHook only for protocol v0 and v1 Add protocol v2 support in "jgit daemon" Teach UploadPack "ofs-delta" in "fetch" Teach UploadPack "include-tag" in "fetch" Avoid using #refs in UploadPack#sendPack FileRepository: Don't use deprecated RefDatabase#getRefs(String) BatchRefUpdate: Don't use deprecated RefDatabase#getRefs(String) Change-Id: I16c5da62d09262d3f4070aa0f466dd6c8352b5ea Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * DescribeCommand: Refactor to not use deprecated Repository#peelDavid Pursehouse2018-05-221-5/+9
| | | | | | | | | | Change-Id: I76073ad62d1bc4fc21d8a1f5fc7eb92060a73baa Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| * Repository: Deprecate #peel methodDavid Pursehouse2018-05-229-11/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Repository: Make #exactRef and #findRef finalDavid Pursehouse2018-05-221-2/+2
| | | | | | | | | | | | | | | | | | This means less cognitive overhead for both implementors and callers, since this way we can guarantee that they are always synonyms for RefDatabase#exactRef and RefDatabase#findRef, respectively. Change-Id: Ic8aeb52fc7ed65672f3f6cd1da39a66908d88baa Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| * Skip ignored directories in FileTreeIteratorThomas Wolf2018-05-226-5/+195
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make FileTreeIterator not enter ignored directories by default. We only need to enter ignored directories if we do some operation against git, and there is at least one tracked file underneath an ignored directory. Walking ignored directories should be avoided as much as possible as it is a potential performance bottleneck. Some projects have a lot of files or very deep hierarchies in ignored directories; walking those may be costly (especially so on Windows). See for instance also bug 500106. Provide a FileTreeIterator.setWalkIgnoredDirectories() operation to force the iterator to iterate also through otherwise ignored directories. Useful for tests (IgnoreNodeTest, CGitIgnoreTest), or to implement things like "git ls-files --ignored". Add tests in DirCacheCheckoutTest, and amend IndexDiffTest to test a little bit more. Bug: 388582 Change-Id: I6ff584a42c55a07120a4369fd308409431bdb94a Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
| * Repository: Deprecate getTags methodDavid Pursehouse2018-05-223-13/+17
| | | | | | | | | | | | | | | | | | | | Callers should use getRefDatabase().getRefsByPrefix(R_TAGS) instead. Adjust the tests accordingly. Bug: 534731 Change-Id: Ib28ae365e42720268996ff46e34cae1745ad545c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| * Merge changes Ibf6ee80d,I721db0f4,I7d014890David Pursehouse2018-05-210-0/+0
| |\ | | | | | | | | | | | | | | | | | | * changes: Remove deprecated Repository#notifyIndexChanged Implementors should override Repository#notifyIndexChanged(boolean) Revive Repository#notifyIndexChanged()
| | * Remove deprecated Repository#notifyIndexChangedJonathan Nieder2018-05-181-10/+0
| | | | | | | | | | | | | | | | | | It is no longer used. Change-Id: Ibf6ee80d5b6cd554295f4e657e087302770621b6
| | * Implementors should override Repository#notifyIndexChanged(boolean)Jonathan Nieder2018-05-181-14/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Declare Repository#notifyIndexChanged() final and Repository#notifyIndexChanged(boolean) abstract to force implementors to switch to overriding the latter method. This makes Repository less error-prone to extend since implementors no longer need to remember to override one of those two methods. Change-Id: I721db0f4a4865db3b35212ee0a2045d5b31c96af Signed-off-by: Jonathan Nieder <jrn@google.com>
| | * Revive Repository#notifyIndexChanged()Jonathan Nieder2018-05-181-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | e9e150fdd24d (Store in IndexChangedEvent if it was caused by JGit itself, 2018-05-13) modified Repository#notifyIndexChanged to take a boolean argument to indicate whether the index change happened under the current process's control or externally, for use by EGit. In other words, the function signature changed from public abstract void notifyIndexChanged(); to public abstract void notifyIndexChanged(boolean internal); Callers outside JGit itself notifying a Repository about index changes are expected to be rare, so this is not very disruptive to them. In most cases they would be notifying about changes that they made themselves, so treating their notifyIndexChanged() calls as notifyIndexChanged(true) should be relatively safe. Implementors have the opposite problem: adding the new "abstract void notifyIndexChanged(boolean)" method means they are obligated to override it. Add a default implementation that calls their existing override of notifyIndexChanged() to make their migration easier. The main downside is that authors of new Repository subclasses that do not realize they need to override notifyIndexChanged would end up with a default implementation which calls notifyIndexChanged(true), in turn calling notifyIndexChanged() again and so on, resulting in StackOverflowException. Add an implementors' note to the class Javadoc to avoid this issue. A followup commit will force implementors to adapt to the new API by changing the methods to @Deprecated public final void notifyIndexChanged() { notifyIndexChanged(true); } public abstract void notifyIndexChanged(boolean internal); Change-Id: I7d014890ee19abf283ea824d9baa9044bfdde130 Signed-off-by: Jonathan Nieder <jrn@google.com>
| * | InfoRefsServlet: Refactor to not use deprecated methodsDavid Pursehouse2018-05-211-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Replace RefDatabase#getRefs(String) with #getRefsByPrefix(String) - Replace RefAdvertiser#send(Map<String, Ref>) with #send(Collection<Ref>) Bug: 534731 Change-Id: I25b617c3b0c54793cf4ab5b62f002e17745a5377 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| * | RefAdvertiser: Add send(Collection<Ref>) and deprecate send(Map<String, Ref>)David Pursehouse2018-05-211-10/+23
| | | | | | | | | | | | | | | | | | Bug: 534731 Change-Id: If15032a34dc62f420569e2b2b6d8e14e2dfed522 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| * | Remove further unnecessary 'final' keywordsHan-Wen Nienhuys2018-05-18203-570/+570
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Execute AdvertiseRefsHook only for protocol v0 and v1Masaya Suzuki2018-05-171-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refs are not advertised as part of the protocol v2 capability advertisement. Don't call AdvertiseRefsHook. Noticed because many implementations of AdvertiseRefsHook read all refs in order to call UploadPack#setAdvertisedRefs, causing the capability advertisement to be as slow as a v0 ref advertisement with some RefDatabase implementations. Such an AdvertiseRefsHook is of dubious utility (a better place to determine which refs are advertised is in the RefDatabase implementation itself, as in Gerrit), but at any rate since it's not bringing about any benefit here, we can skip the hook call. TODO: - call an appropriate hook instead (https://bugs.eclipse.org/534847) - add tests [jn: fleshed out commit message; added TODO notes] Change-Id: I6eb60ccfb251a45432954467a9ae9c1079a8c8b5 Signed-off-by: Masaya Suzuki <masayasuzuki@google.com> Signed-off-by: Jonathan Nieder <jrn@google.com>
| * Add protocol v2 support in "jgit daemon"Jonathan Tan2018-05-163-6/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this patch, a server spawned by "jgit daemon" can be accessed using protocol v2 from a Git client that supports it (for example, "git" with the appropriate patches). This is only activated if the repository's config has "protocol.version" be 2. This required a change to the package-private #execute methods in DaemonService to allow passing of extra parameters. This has been tested with a patched Git. Change-Id: Icf043efec7ce956d72b075fc6dc7a87d5a2da82a Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
| * Teach UploadPack "ofs-delta" in "fetch"Jonathan Tan2018-05-162-5/+46
| | | | | | | | | | | | | | | | Add support for the "ofs-delta" parameter in the "fetch" command in the fetch-pack/upload-pack protocol v2. Change-Id: I728cf986082fce4ddeb6a6435897692e15e60cc7 Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
| * Teach UploadPack "include-tag" in "fetch"Jonathan Tan2018-05-162-1/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for the "include-tag" parameter in the "fetch" command in the fetch-pack/upload-pack protocol v2. In order to determine which tags to include, only objects pointed to by refs starting with "refs/tags/" are checked. This restriction is for performance reasons and to match the behavior of Git (see add_ref_tag() in builtin/pack-objects.c). Change-Id: I7d70aa09bcc8a525218ff1559e286c2a610258ca Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Jonathan Nieder <jrn@google.com>
| * Avoid using #refs in UploadPack#sendPackJonathan Tan2018-05-161-9/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When OPTION_INCLUDE_TAG is set, UploadPack#sendPack uses the #refs instance variable as a source of information of tags. A subsequent patch will need to supply this information to #sendPack without modifying #refs, so refactor #sendPack to take in this information through a parameter instead. Note that prior to this patch, #refs was used twice in #sendPack: once to generate the argument to PackWriter#setTagTargets, and once to determine if any tags need to be included in the packfile. This patch only updates the latter use, since the former is meant not only for "true" tag targets but any object that should be hoisted earlier during packing (see the documentation of PackWriter#setTagTargets). This patch does not introduce any functionality change. Change-Id: I70ed65a1041334abeda8d4bac98cce7cae7efcdf Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Jonathan Nieder <jrn@google.com>
| * FileRepository: Don't use deprecated RefDatabase#getRefs(String)David Pursehouse2018-05-151-3/+1
| | | | | | | | | | Change-Id: Iec58c973537ddbe0f4e6b8b62fcda5cecc961661 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| * BatchRefUpdate: Don't use deprecated RefDatabase#getRefs(String)David Pursehouse2018-05-151-2/+4
| | | | | | | | | | Change-Id: I672c9cfe221ddc4acbde7a8040bd6ba83b16626e Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | Prepare 5.0.0-SNAPSHOT buildsMatthias Sohn2018-05-1656-59/+59
| | | | | | | | | | Change-Id: I65d7d74c6124507aa9cb2856c74db6a1a6935bab Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | JGit v5.0.0.201805151920-m7v5.0.0.201805151920-m7Matthias Sohn2018-05-1656-59/+59
|/ | | | | Change-Id: I42eb046c8ac8537672010aabe21459293cb23838 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Remove 'final' in parameter listsHan-Wen Nienhuys2018-05-15384-1357/+1357
| | | | | Change-Id: Id924f79c8b2c720297ebc49bf9c5d4ddd6d52547 Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
* Fixup javadoc and formatting in RawText and RawParseUtilsHan-Wen Nienhuys2018-05-142-25/+30
| | | | | Change-Id: I9d6002941a33ec204d29e4fd920dde965387bb24 Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
* RawParseUtils#lineMap: Simplify by using null sentinel internallyJonathan Nieder2018-05-141-13/+11
| | | | | | | | | | Add an internal lineMapOrNull helper that returns null when the file is binary. This is simpler than using an exception for control flow and avoids having to override fillInStackTrace to avoid a performance regression. Change-Id: Ib8bb8df6a6bbd60c62cfb3b4c484a962a98b7507
* Store in IndexChangedEvent if it was caused by JGit itselfMatthias Sohn2018-05-135-18/+52
| | | | | | | This allows to differentiate if index was changed by an external git command or by JGit itself. Change-Id: Iae692ba7d9bf01a288b3fb2dc2d07aec9891c712 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Introduce new RawText constructor and RawParseUtils.lineMapOrBinaryHan-Wen Nienhuys2018-05-124-11/+83
| | | | | | | | | | | This makes binary detection exact in ResolveMerger and DiffFormatter This has the same intention as Id4342a199628d9406bfa04af1b023c27a47d4014 but preserves backward compatibility of the signature of RawParseUtils.lineMap. Change-Id: Ia24a4e716592bab3363ae24e3a46315a7511154f Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Use a secure random generator to seed nonce for digest authenticationMatthias Sohn2018-05-111-2/+2
| | | | | | | | | | | | | https://tools.ietf.org/html/rfc7616 says: 5.12. Parameter Randomness The security of this protocol is critically dependent on the randomness of the randomly chosen parameters, such as client and server nonces. These should be generated by a strong random or properly seeded pseudorandom source (see [RFC4086]). Change-Id: I4da5316cb1eb3f59ae06c070ce1c3335e9ee87d6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Merge branch 'stable-4.11'Matthias Sohn2018-05-103-30/+56
|\ | | | | | | | | | | | | | | * stable-4.11: Retry stale file handles on .git/config file Change-Id: I4fe6152c3c40dde9cb88913cc9706852de0fd712 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Merge branch 'stable-4.10' into stable-4.11Matthias Sohn2018-05-103-30/+56
| |\ | | | | | | | | | | | | | | | | | | * stable-4.10: Retry stale file handles on .git/config file Change-Id: Ice5c8ae8c2992243a81da77e166406bc1930fe0e
| | * Merge branch 'stable-4.9' into stable-4.10Matthias Sohn2018-05-103-30/+56
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.9: Retry stale file handles on .git/config file Change-Id: I6db7256dbd1c71b23e1231809642ca21e996e066 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * Merge branch 'stable-4.8' into stable-4.9Matthias Sohn2018-05-103-31/+56
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.8: Retry stale file handles on .git/config file Change-Id: Ib029b5536c038190626e7a7ff43b70f0a5673721
| | | | * Merge branch 'stable-4.7' into stable-4.8Matthias Sohn2018-05-103-31/+56
| | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.7: Retry stale file handles on .git/config file Change-Id: Ib665c094b28eefb8236752bb273de0c2d9bf9578
| | | | | * Merge branch 'stable-4.6' into stable-4.7Matthias Sohn2018-05-103-31/+56
| | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.6: Retry stale file handles on .git/config file Change-Id: If5a21d38224528edfc551b3216daca6a2582e3ac
| | | | | | * Merge branch 'stable-4.5' into stable-4.6Matthias Sohn2018-05-103-31/+56
| | | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.5: Retry stale file handles on .git/config file Change-Id: Ib6e6ec0846c3ef261ec1016bfa6d26d2eadc3f26
| | | | | | | * Retry stale file handles on .git/config fileNasser Grainawi2018-05-103-31/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On a local non-NFS filesystem the .git/config file will be orphaned if it is replaced by a new process while the current process is reading the old file. The current process successfully continues to read the orphaned file until it closes the file handle. Since NFS servers do not keep track of open files, instead of orphaning the old .git/config file, such a replacement on an NFS filesystem will instead cause the old file to be garbage collected (deleted). A stale file handle exception will be raised on NFS clients if the file is garbage collected (deleted) on the server while it is being read. Since we no longer have access to the old file in these cases, the previous code would just fail. However, in these cases, reopening the file and rereading it will succeed (since it will open the new replacement file). Since retrying the read is a viable strategy to deal with stale file handles on the .git/config file, implement such a strategy. Since it is possible that the .git/config file could be replaced again while rereading it, loop on stale file handle exceptions, up to 5 extra times, trying to read the .git/config file again, until we either read the new file, or find that the file no longer exists. The limit of 5 is arbitrary, and provides a safe upper bounds to prevent infinite loops consuming resources in a potential unforeseen persistent error condition. Change-Id: I6901157b9dfdbd3013360ebe3eb40af147a8c626 Signed-off-by: Nasser Grainawi <nasser@codeaurora.org> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | | Mark CrissCrossMergeTest as flakyJonathan Nieder2018-05-081-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It often fails on my machine, both in maven and bazel. This patch marks the test flaky[1] in bazel so that "bazel test" can run it a few times before declaring failure. [1] https://docs.bazel.build/versions/master/be/common-definitions.html#test.flaky Bug: 534285 Change-Id: Ibe5414fefbffe4e8f86af7047608d51cf5df5c47
* | | | | | | | Merge "Add API filter for "non-API type FileRepository" in tests"Matthias Sohn2018-05-051-0/+35
|\ \ \ \ \ \ \ \
| * | | | | | | | Add API filter for "non-API type FileRepository" in testsDavid Pursehouse2018-05-061-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: If805ad4a962e48dd16fbc7eff915fd6539839933 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | | Replace http://errorprone.info with https://errorprone.infoJonathan Nieder2018-05-041-1/+1
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That site serves from https now. Reported-by: Nicholas Glorioso <glorioso@google.com> Change-Id: I2150a18425a1fe3ab5a022882ffe06ccbde17f16 Signed-off-by: Jonathan Nieder <jrn@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
* | | | | | | | ssh: Kill the external process when we're done instead of waiting foreverCarsten Pfeiffer2018-05-021-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 529463 Change-Id: Iaf6fe20a1c759ac5e91a2393d7bc40a94f859e84 Signed-off-by: Carsten Pfeiffer <carsten.pfeiffer@gebit.de>
* | | | | | | | Rename RefDatabase#getAllRefs to getRefsJonathan Nieder2018-04-2914-37/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-292-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>