aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit
Commit message (Collapse)AuthorAgeFilesLines
* Fix javadoc in org.eclipse.jgit ketch packageMatthias Sohn2017-12-1818-130/+380
| | | | Change-Id: I72be0a0d5ac7d3e957597803bd103dbbec141ba4
* Fix javadoc in org.eclipse.jgit internal and fsck packagesMatthias Sohn2017-12-183-9/+54
| | | | Change-Id: Ib12da10aacda9389d594bf4f521e9a58d1935701 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix javadoc in org.eclipse.jgit ignore packageMatthias Sohn2017-12-1811-16/+55
| | | | Change-Id: I1a81d371420cd4cf90ab9e048026c0ab8a763018 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix javadoc in org.eclipse.jgit hooks packageMatthias Sohn2017-12-186-7/+54
| | | | Change-Id: I3b644048eb0fc19f94ba8f9799b5a2310481103f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix javadoc in org.eclipse.jgit gitrepo packageMatthias Sohn2017-12-184-6/+49
| | | | Change-Id: I2604c7bca87f005004d6d6c80fa9a39a7a1e3807 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix javadoc in org.eclipse.jgit fnmatch packageMatthias Sohn2017-12-188-11/+44
| | | | Change-Id: I14384c3bf3c41f8e1c62ec117837c2fc782a832f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix javadoc in org.eclipse.jgit events packageMatthias Sohn2017-12-1812-26/+66
| | | | Change-Id: Ifcb9c67daeb9da84a1461a4f731523ac5df3a223 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix javadoc in org.eclipse.jgit errors packageMatthias Sohn2017-12-1831-47/+156
| | | | Change-Id: I46aa5c3073b99a311a1a97fc57d8f29d32524482 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix javadoc in org.eclipse.jgit dircache packageMatthias Sohn2017-12-1810-92/+153
| | | | Change-Id: Ib485eb217ac6be70519816f8cc0396931043a3d1 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* EmtpyCommitException: Add TODO to fix misspelled class name in 5.0David Pursehouse2017-12-181-1/+1
| | | | | Change-Id: I5bb145d6d6cbaaa2d8cfb2febad7a008ca921236 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Fix javadoc org.eclipse.jgit diff packageMatthias Sohn2017-12-1822-160/+333
| | | | Change-Id: I7162d72916abc8533ad37e8b17335ff4a70d6519 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix javadoc in org.eclipse.jgit annotations and api packagesMatthias Sohn2017-12-1893-723/+1387
| | | | Change-Id: I2761ea91f8dfed16ea54e7a6646af03a30c15ec9 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix javadoc in org.eclipse.jgit blame packageMatthias Sohn2017-12-175-31/+100
| | | | Change-Id: I116dacc7f4ace341ec6ffae2ab96b53496d89f64 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix javadoc in org.eclipse.jgit attributes packageMatthias Sohn2017-12-1710-81/+171
| | | | Change-Id: I12968f4be805266f285a518a014b8bd1d0c23bae Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Merge branch 'stable-4.9'David Pursehouse2017-12-162-5/+37
|\ | | | | | | | | | | | | | | | | | | * stable-4.9: Prepare 4.9.3-SNAPSHOT builds JGit v4.9.2.201712150930-r Write packed-refs directly when cloning Change-Id: I3b0fad9c45cdf3a918ddb8ea4a37b8d3403aae90 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Write packed-refs directly when cloningThomas Wolf2017-12-152-5/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we are cloning we have no refs at all yet, and there cannot (or at least should not) be any other thread doing something with refs yet. Locking loose refs is thus not needed, since there are no loose refs yet and nothing should be trying to create them concurrently. Let's skip the whole loose ref locking when we are cloning a repository. As a result, JGit will write the refs directly to the packed-refs file, and will not create the refs/remotes/ directories nor the lock files underneath when cloning and packed refs are used. Since no lock files are created, any problems on case-insensitive file systems with tag or branch names that differ only in case are avoided during cloning. Detect if we are cloning based on the following heuristics: * HEAD is a dangling symref * There is no loose ref * There is no packed-refs file Note, however, that there may still be problems with such tag or branch names later on. This is primarily a five-minutes-past-twelve stop-gap measure to resolve the referenced bug, which affects the Oxygen.2 release. Bug: 528497 Change-Id: I57860c29c210568165276a123b855e462b6a107a Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Config: Remove the include functionalityDavid Pursehouse2017-12-151-39/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Config class must be safe to run against untrusted input files. Reading arbitrary local system paths using include.path is risky for servers, including Gerrit Code Review. This was fixed on master [1] by making "readIncludedConfig" a noop by default. This allows only FileBasedConfig, which originated from local disk, to read local system paths. However, the "readIncludedConfig" method was only introduced in [2] which was needed by [3], both of which are only on the master branch. On the stable branch only Config supports includes. Therefore this commit simply disables the include functionality. [1] https://git.eclipse.org/r/#/c/113371/ [2] https://git.eclipse.org/r/#/c/111847/ [3] https://git.eclipse.org/r/#/c/111848/ Bug: 528781 Change-Id: I9a3be3f1d07c4b6772bff535a2556e699a61381c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | DfsFsck: Skip unborn branches and symrefs to nowhereZhen Chen2017-12-151-2/+8
| | | | | | | | | | | | | | | | | | | | The map returned by getAllRefs includes all refs, including symrefs like HEAD that may not point to any object yet. That is a valid state (e.g., in a new repository that has just been created by "git init"), so skip such refs. Change-Id: Ieff8a1aa738b8d09a2990d075eb20601156b70d3 Signed-off-by: Zhen Chen <czhen@google.com>
* | Merge branch 'stable-4.9'David Pursehouse2017-12-141-1/+1
|\| | | | | | | | | | | | | | | * stable-4.9: InMemoryRepository: Make inner class MemObjDatabase static Change-Id: I62bb5957de1ae3bc6030ea2181b09efccc48252b Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| * InMemoryRepository: Make inner class MemObjDatabase staticDavid Pursehouse2017-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | FindBugs reports: This class is an inner class, but does not use its embedded reference to the object which created it. This reference makes the instances of the class larger, and may keep the reference to the creator object alive longer than necessary. If possible, the class should be made static. Change-Id: I9f49de32b4cd81b7ef1239b390353689263bf66e Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | Make Config.readIncludedConfig a noop by defaultShawn Pearce2017-12-131-18/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The Config class must be safe to run against untrusted input files. Reading arbitrary local system paths using include.path is risky for servers, including Gerrit Code Review. Return null by default to incide the include should be ignored. Only FileBasedConfig which originated from local disk should be trying to read local system paths. FileBasedConfig already overrides this method with its own implementation. Change-Id: I2ff31753868aa1bbac4a6843a4c23e50bd6f46f3
* | DfsBlockCache.hasBlock0: quickly check for file in cacheShawn Pearce2017-12-131-0/+17
| | | | | | | | | | | | | | | | This can be useful for sophisticated pre-read algorithms to quickly determine if a file is likely already in cache, especially small reftables which may be smaller than a typical DFS block size. Change-Id: I7756948063b722ff650c9ba82060ff9ad554b0ba
* | Merge branch 'stable-4.9'David Pursehouse2017-12-131-1/+1
|\| | | | | | | | | | | | | | | | | * stable-4.9: TransportCommand#setTimeout: Specify units for timeout in Javadoc Fix typo in key of a JGitText externalized string Change-Id: Icb60537d2e99cb6e928d9fe07f66695ed69081b5 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| * TransportCommand#setTimeout: Specify units for timeout in JavadocDavid Turner2017-12-121-1/+1
| | | | | | | | | | Change-Id: Iadf0e2c6483794e43a5326f6be6bb34c19b00564 Signed-off-by: David Turner <dturner@twosigma.com>
| * Fix typo in key of a JGitText externalized stringMatthias Sohn2017-12-112-2/+2
| | | | | | | | Change-Id: I0d22e24a0aa3b17339ef68849554f7c99b350dde Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Fix typo in key of a JGitText externalized stringMatthias Sohn2017-12-102-2/+2
| | | | | | | | Change-Id: I0d22e24a0aa3b17339ef68849554f7c99b350dde Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Merge branch 'stable-4.9'Matthias Sohn2017-12-102-6/+29
|\| | | | | | | | | | | | | * stable-4.9: Fix IllegalThreadStateException if stderr closed without exiting Change-Id: I8a6a6788c2bb000171233b88d9592ed0640ad15e
| * Fix IllegalThreadStateException if stderr closed without exitingDmitry Pavlenko2017-12-102-6/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | If some process executed by FS#readPipe lived for a while after closing stderr, FS#GobblerThread#run failed with an IllegalThreadStateException exception when accessing p.exitValue() for the process which is still alive. Add Process#waitFor calls to wait for the process completion. Bug: 528335 Change-Id: I87e0b6f9ad0b995dbce46ddfb877e33eaf3ae5a6 Signed-off-by: Dmitry Pavlenko <pavlenko@tmatesoft.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | CloneCommand: Refactor listing of files in deleteChildrenDavid Pursehouse2017-12-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | File.listFiles() returns null if the given File does not represent a directory, so we can just test for null instead of making a separate call to FS.DETECTED.isDirectory() This also avoids a false-positive error from SpotBugs which claims that there is a potential null-pointer exception on dereferencing the result of Files.listFiles(). Change-Id: I18e09e391011db997470f5a09d8e38bb604c0213 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | DfsBlockCache#creditSpace: release clockLock in finally blockDavid Pursehouse2017-12-071-2/+5
| | | | | | | | | | | | | | | | | | Enclose the call to getStat in a `try`, and release the previously acquired lock in the `finally`. This prevents that the lock is left unreleased in the case of an exception being raised in getStat. Change-Id: I17b4cd134dae887e23a1165253be0ac2d4fd452c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | FS_POSIX: Fix boxing/unboxing of BooleanDavid Pursehouse2017-12-071-12/+19
| | | | | | | | | | | | | | | | | | | | Boolean is being abused to represent three possible states of atomic file creation support (true/enabled, false/disabled, null/undefined). Replace this with an enum of the three explicit states. Change-Id: I2cd7fa6422311dc427823304b082ce8da50d2fbe Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | Use constants from StandardCharsets instead of hard-coded stringsDavid Pursehouse2017-12-074-43/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of hard-coding the charset strings "US-ASCII", "UTF-8", and "ISO-8859-1", use the corresponding constants from StandardCharsets. UnsupportedEncodingException is not thrown when the StandardCharset constants are used, so remove the now redundant handling. Because the encoding names are no longer hard-coded strings, also remove redundant $NON-NLS warning suppressions. Also replace existing usages of the constants with static imports. Change-Id: I0a4510d3d992db5e277f009a41434276f95bda4e Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | Merge branch 'stable-4.9'David Pursehouse2017-12-071-1/+1
|\| | | | | | | | | | | | | | | * stable-4.9: LfsStore: Make inner class AppServer static DirCacheCheckout#processEntry: Fix typo in javadoc Change-Id: Id8e4a3c4dc741e6e0182522e72ecb4b34ae419eb
| * DirCacheCheckout#processEntry: Fix typo in javadocDavid Pursehouse2017-12-061-1/+1
| | | | | | | | | | Change-Id: Ie08a6275f4656ebb46abe8748b73b0fb52a98a35 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | TransportHttp: retry on IOException with another mechanismThomas Wolf2017-12-061-7/+22
| | | | | | | | | | | | | | | | | | | | | | | | When a 401 occurs on POST and the server advertises Negotiate, we may get an exception from GSSAPI if the client isn't configured at all for Kerberos. Add exception logic similar to the GET case: keep trying other authentication mechanisms if this occurs. Bug: 501167 Change-Id: Ic3a3368378d4b3408a35aec93e78ef425d54b3e4 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | ConfigTest: Move pathToString to FileUtilsDavid Pursehouse2017-12-061-0/+14
| | | | | | | | | | | | | | | | | | | | | | ConfigTest#pathToString is not visible to FileBasedConfigTest when bulding with bazel. Move it to FileUtils rather than messing about with the bazel build rules to make it visible. Change-Id: Idcfd4822699dac9dc4a426088a929a9cd31bf53f Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | FileBasedConfig: support for relative includesMarc Strapetz2017-12-041-0/+30
| | | | | | | | | | | | | | | | | | Relative include.path are now resolved against the config's parent directory. include.path starting with ~/ are resolved against the user's home directory Change-Id: I91911ef404126618b1ddd3589294824a0ad919e6 Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>
* | Config: extract method to read included configMarc Strapetz2017-12-041-17/+40
| | | | | | | | | | Change-Id: I2c55af3e5fe29e0ce8e3d05e4b54ec961d3f863a Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>
* | Merge branch 'stable-4.9'Matthias Sohn2017-11-301-0/+24
|\| | | | | | | | | | | | | | | | | * stable-4.9: GC: Delete stale temporary packs and indexes Change-Id: I49b37845ee8a465404b801a2d8de0205a2e7ba30 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| * GC: Delete stale temporary packs and indexesHector Caballero2017-11-241-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a GC operation is interrupted, temporary packs and indexes can be left on the pack folder. In big, busy repositories this can lead to significant amounts of wasted disk space if this interruption is done with a certain frequency. Remove stale temporary packs and indexes at the end of the GC process so they do not accumulate. To avoid interfering with a possible concurrent JGit GC process in the same repository, only delete temporary files that are older than one day. Change-Id: If9b6c1e57fac8a6a0ecc0a703089634caba4caae Signed-off-by: Hector Caballero <hector.caballero@ericsson.com>
* | Merge "Break down DfsBlockCache stats by pack file extension."Shawn Pearce2017-11-283-67/+166
|\ \
| * | Break down DfsBlockCache stats by pack file extension.Minh Thai2017-11-273-67/+166
| | | | | | | | | | | | | | | Change-Id: Iaecf0580279b33e3e2439784528cae7b69fb28bc Signed-off-by: Minh Thai <mthai@google.com>
* | | RepoCommand: Skip RemoteReader when encountering a full SHA-1Jonathan Nieder2017-11-281-2/+1
|/ / | | | | | | | | | | | | | | | | | | | | There is no point in calling back to the RemoteReader to resolve a 40-digit hex SHA-1 to itself. We already skip that call when not ignoring remote failures; skip it when ignoring remote failures, too. This should simplify RemoteReader implementations. Reported-by: Han-Wen Nienhuys <hanwen@google.com> Change-Id: I7566968ed1f39b1ad73574fa903faf3ee308eb87
* | Performance improvement on writing a large indexStephen Lawson2017-11-231-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The index header consists of a 4-byte version number. The current supported version numbers are 2 and 3. The code checks if any entries are extended. If it finds any entries that are extended it picks version '3', otherwise it chooses version '2'. DirCache.java -Changed the 'extended' check to exit early when any entry is considered 'extended' in the index. (Of course, I maybe missing a bitwise optimization that is made in the Java bytecode.) Change-Id: If70db9454befe683319b974ebd3774060be9445d Signed-off-by: Stephen Lawson <slawson@ptc.com>
* | Merge branch 'stable-4.9'Matthias Sohn2017-11-245-3/+136
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.9: Ignore warning for minor version change without API change Silence boxing warning Prepare 4.5.5-SNAPSHOT builds JGit v4.5.4.201711221230-r Fix LockFile semantics when running on NFS Honor trustFolderStats also when reading packed-refs Prepare 4.5.4-SNAPSHOT builds JGit v4.5.3.201708160445-r Change-Id: Icc33d2e36f140e8714fce088379673a8834ae9de
| * Merge branch 'stable-4.8' into stable-4.9Matthias Sohn2017-11-245-3/+136
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.8: Silence boxing warning Prepare 4.5.5-SNAPSHOT builds JGit v4.5.4.201711221230-r Fix LockFile semantics when running on NFS Honor trustFolderStats also when reading packed-refs Prepare 4.5.4-SNAPSHOT builds JGit v4.5.3.201708160445-r Change-Id: I7cf2e48934195430b3945b6d74b092f93a3ccd36 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * Merge branch 'stable-4.7' into stable-4.8Matthias Sohn2017-11-225-3/+136
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.7: Silence boxing warning Prepare 4.5.5-SNAPSHOT builds JGit v4.5.4.201711221230-r Fix LockFile semantics when running on NFS Honor trustFolderStats also when reading packed-refs Prepare 4.5.4-SNAPSHOT builds JGit v4.5.3.201708160445-r Change-Id: Iaa99ec84594baf733c993c2d6768281ff14f545a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * Merge branch 'stable-4.6' into stable-4.7Matthias Sohn2017-11-225-3/+136
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.6: Silence boxing warning Prepare 4.5.5-SNAPSHOT builds JGit v4.5.4.201711221230-r Fix LockFile semantics when running on NFS Honor trustFolderStats also when reading packed-refs Prepare 4.5.4-SNAPSHOT builds JGit v4.5.3.201708160445-r Change-Id: I8f6bc09540727c6273d22775a9f9ca382a729c9b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | * Silence boxing warningMatthias Sohn2017-11-221-0/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I36c40eb91ce0c51f89b47911fa14beffcbc0a7cd Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | * Merge branch 'stable-4.5' into stable-4.6Matthias Sohn2017-11-225-3/+134
| | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.5: Prepare 4.5.5-SNAPSHOT builds JGit v4.5.4.201711221230-r Fix LockFile semantics when running on NFS Honor trustFolderStats also when reading packed-refs Prepare 4.5.4-SNAPSHOT builds JGit v4.5.3.201708160445-r Change-Id: Ie9c8e0d9172c8d53f075c284bf2a9677980d8dfb Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>