summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Prepare 3.6.0-SNAPSHOT buildsMatthias Sohn2014-09-0555-265/+265
| | | | | Change-Id: I2d8c3768998c0cfc8d02d11009bc5b7ed1d75778 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* PackWriter: Report more stats during partial writesShawn Pearce2014-09-041-28/+29
| | | | | | | | | | | It can be useful for a server operator to know how long a pack writer spent writing out objects, even if the request aborts and never finishes. Record more of the stats data inside of a finally block, to ensure these can be included into the server's monitoring. Change-Id: I00858aa393a948f8e742e64ae4c00953eadaef95
* Update the README with current modules and featuresRobin Rosenberg2014-09-041-8/+82
| | | | Change-Id: Ic30f55f30ce260dc02c428e1ebf11f01cb790a6e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Drop warnings about unchecked casts in a few stable select placesRobin Rosenberg2014-09-047-2/+11
| | | | Change-Id: Ie163a4940f0d13bbdefd8c4643c0944c71800544
* Hide warnings about field hiding in the MyersDiff codeRobin Rosenberg2014-09-041-0/+1
| | | | | | Just suppress warning in this stable code rather then fixing names Change-Id: I07580aa3cbdaa66852a5c919769bbd9020d78703
* Fix warnings about missing serialVersionUIDRobin Rosenberg2014-09-041-1/+2
| | | | | | Use @SuppressWarnings since these are private classes Change-Id: Ic8e4c08b70627a3f9b031e2474092e1ce8116f22
* Fix warning about missing serialVersionUIDRobin Rosenberg2014-09-041-0/+2
| | | | Change-Id: Ia9532d1aaf92df9073c85c44ff2ca94796deefc2
* Rename local variables/parameters to remove warnings about hidingRobin Rosenberg2014-09-049-50/+50
| | | | Change-Id: I73f38492b6a2e7fd6e77005efd0a8a8c65763e74
* Remove non-existing source directories from Java 7 test buildRobin Rosenberg2014-09-041-3/+0
| | | | | | | This was a copy-artifact when the bundle was created. This chanhe removed some warnings in Eclipse. Change-Id: I32acdf4b60bf5528566e66b1fd82113b1343ed37
* Eliminate warnings for non-nls strings that will never be translatedRobin Rosenberg2014-09-047-26/+26
| | | | | | | Some of these eliminations just reduces the number of warnings on lines where messages are constructed that can/will be translated. Change-Id: I6eddb39ccc8f2488741bb58540d9ec5f5665e2c4
* Windows: Hide the .git directory if hidedotfiles is set to non-falseRobin Rosenberg2014-09-044-0/+41
| | | | | | Other .git files are not hidden with this patch Change-Id: Idf63ca08d08f3a77c33f5848d02074f8d6a75758 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Add the resources directory to the Eclipse classpathRobin Rosenberg2014-09-041-0/+1
| | | | | | This removes a warning in Eclipse. Change-Id: I5961ebf2052aff3e5d853451f69c7d75890ac53a
* PlotCommitList: Close plot lanes at root commitsKonrad Kügler2014-09-022-5/+43
| | | | | Bug: 443006 Change-Id: I40b1eb044fa2d9e6c5d4b956c17e32ca6c1bd39f Signed-off-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de>
* Prevent NPE if no CredentialsProvider is registeredMatthias Sohn2014-09-013-0/+5
| | | | | | | | | If the git server requires authentication and no CredentialsProvider is registered TransportHttp.connect() would throw an NPE since it tries to reset the credentials provider. Instead throw a TransportException explaining the problem. Change-Id: Ib274e7d9c43bba301089975423de6a05ca5169f6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Handle -m option for Merge commandAxel Richard2014-08-305-5/+118
| | | | | | | | | Set the commit message to be used for the merge commit (in case one is created) Bug: 442886 Change-Id: Ie5ecc13822faa366f00b3daa07f74c8441cae195 Signed-off-by: Axel Richard <axel.richard@obeo.fr> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* UploadPack: Always make PackWriter.Statistics availableShawn Pearce2014-08-291-4/+3
| | | | | | | | | | If the packer fails, still obtain the stats and make them available to the logger and the caller. Failures can frequently happen when a client disconnects in the middle of a pack stream. Server admins may still want to examine the timing metrics from counting and compressing phases. Change-Id: Iceae4f68b5473f4223d85c9edfb57837fc818eed
* PackIndexV2 should check for possible corruptionMarc Strapetz2014-08-293-1/+7
| | | | | Change-Id: I1803ec6d8141f07dd4085778da6461abe81c30a9 Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>
* Allow projects without path attribute in manifest.Yuxuan 'fishy' Wang2014-08-281-1/+4
| | | | | | | In such case, we use the name attribute as the default value of path. Change-Id: I53fa312d6b64c6eb2240f08af7d1d60cea99192a Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
* Merge "PackIndexV2: fix possibly wrong check"Shawn Pearce2014-08-281-1/+1
|\
| * PackIndexV2: fix possibly wrong checkMarc Strapetz2014-08-151-1/+1
| | | | | | | | | | | | | | | | According to http://stackoverflow.com/a/8381338, the maximum array size is not Integer.MAX_VALUE, but Integer.MAX_VALUE - 8 Change-Id: I6ddc7470368acd20abf0885c53c89a982bb0f176 Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>
* | Let ObjectWalk.markUninteresting also mark the root tree asSaša Živkov2014-08-282-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | uninteresting Using the ObjectWalk and marking a commit as uninteresting didn't mark its root tree as uninteresting. This caused the "missing tree ..." error in Gerrit under special circumstances. For example, if the patch-set 2 changes only the commit message then the patch-set 1 and patch-set 2 share the same root-tree: ps1 -> o o <- ps2 \ / o root-tree The transported pack will contain the ps2 commit but not the root-tree object. When using the BaseReceivePack.setCheckReferencedObjectsAreReachable JGit will check the reachability of all referenced objects not provided in the transported pack. Since the ps1 was advertised it will properly be marked as uninteresting. However, the root-tree was reachable because the ObjectWalk.markUninteresting missed to mark it as uninteresting. JGit was then rejecting the pack with the "missing tree ..." exception. Gerrit-issue: https://code.google.com/p/gerrit/issues/detail?id=1582 Change-Id: Iff2de8810f14ca304e6655fc8debeb8f3e20712b Signed-off-by: Saša Živkov <sasa.zivkov@sap.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Handles repo manifest file without default remote.Yuxuan 'fishy' Wang2014-08-271-8/+12
| | | | | | | | | | Change-Id: Ic45919a0b695e8a6f4ed47cc060e0c41f1d7e7ea Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
* | Merge "ReceivePack: Accept shallow lines from Git >= 1.9"Shawn Pearce2014-08-271-2/+21
|\ \
| * | ReceivePack: Accept shallow lines from Git >= 1.9Shawn Pearce2014-08-271-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Git 1.9 (5dbd767601 "support pushing from a shallow clone") the git-core project intentionally broke the existing send-pack protocol from shallow clients. Shallow clients now transmit their shallow information during push, ahead of the old-new command sequence. JGit must accept these lines when presented. To protect the server against clients sending partial history, require the connectivity check when pushed to by a shallow client. Change-Id: I46639366b0900052c376091e1688f07def44ab79
* | | Merge "Strip "<", ">", and "\n" from name/email in UserConfig"Robin Rosenberg2014-08-222-2/+20
|\ \ \
| * | | Strip "<", ">", and "\n" from name/email in UserConfigRobin Stocker2014-08-212-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This matches what C Git does, see "stripped" in `man git-commit-tree`. It also fixes the bug of the user where an user.email like "<>" would show up as "<<>>" in EGit. Bug: 439844 Change-Id: I567a3c620e191ce9d37d318417e63cb5d4483419 Signed-off-by: Robin Stocker <robin@nibor.org>
* | | | Merge "Throw URISyntaxException for incorrect percent-encoding"Robin Rosenberg2014-08-211-2/+13
|\ \ \ \ | |/ / / |/| | |
| * | | Throw URISyntaxException for incorrect percent-encodingYi EungJun2014-08-211-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | URIish.unescape() threw an ArrayIndexOutOfBoundsException if the given url has incorrect percent-encoding (e.g. http://example.com/%gg). But an URISyntaxException is much better to know the reason of the failure. Change-Id: I3f40a26d43cd2eb4e32c11aba7dc2594bc1f98e2 Signed-off-by: Yi EungJun <eungjun.yi@navercorp.com>
* | | | Merge "Fix minor spelling error in comment"Robin Stocker2014-08-191-1/+1
|\ \ \ \
| * | | | Fix minor spelling error in commentRobin Rosenberg2014-08-191-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I320b5cd526827844d4fe0cbc0f32551010e98090
* | | | | Merge "cleanup: Remove no-longer needed API compatibility warning filters"Christian Halstrick2014-08-191-38/+0
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | cleanup: Remove no-longer needed API compatibility warning filtersRobin Rosenberg2014-08-031-38/+0
| | | | | | | | | | | | | | | | | | | | Change-Id: If534bd0aedaee6160679e965ad08ac30d5dac1c5
* | | | | Support remote aliases in repo manifest.Yuxuan 'fishy' Wang2014-08-182-2/+29
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Icbe5761b9d8a4ae5305bfe45b2d042f214156fc8 Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
* | | | | Support non-default remotes in project tag.Yuxuan 'fishy' Wang2014-08-182-9/+53
| |/ / / |/| | | | | | | | | | | | | | | Change-Id: I3c730a1ce379d142d3ed81dda4a73f86f1f9c3eb Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
* | | | Add tests for checking out tags with CheckoutCommandRobin Stocker2014-08-171-3/+29
| | | | | | | | | | | | | | | | | | | | Change-Id: Ifec3ac59264c91e154b832fdd907736faf8a8412 Signed-off-by: Robin Stocker <robin@nibor.org>
* | | | Add toString to Git with repository pathRobin Stocker2014-08-171-0/+4
| |/ / |/| | | | | | | | | | | | | | | | | Useful for debugging. Change-Id: I78b92ccbcc099370fc99a1d2fa2cf60d5f5892e6 Signed-off-by: Robin Stocker <robin@nibor.org>
* | | ResolveMerger: Use the ObjectReader to access objectsShawn Pearce2014-08-152-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | This is necessary to ensure objects accessed by the TreeWalk come from the associated ObjectInserter when the merger is a RecursiveMerger instance and a virtual common base was constructed but not flushed. Change-Id: Iebe739d30fd868ebc4f61dbfb714673146a2c3ec
* | | Cleanup use of java.util.Inflater, fixing rare infinite loopsShawn Pearce2014-08-146-81/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The native implementation of inflate() can set finished to return true at the same time as it copies the last bytes into the buffer. Check for finished on each iteration, terminating as soon as libz knows the stream was completely inflated. If not finished, it is likely input is required before the next native call could do any useful work. Most invocations are passing in a buffer large enough to store the entire result. A partial return from inflate() will need more input before it can continue. Checking right away that needsInput() is true saves a native call to determine no bytes can be inflated without more input. This should fix a rare infinite loop condition inside of inflation when an object ends exactly at the end of a block boundary, and the next block contains only the 20 byte trailing SHA-1. When the stream is finished each new attempt to inflate() returns n == 0, as no additional bytes were output. The needsInput() test tries to add the length of the footer block to itself, but then loops back around an reloads the same block as the block is smaller than a full block size. A zero length input is set to the inflater, which triggers needsInput() condition again. Change-Id: I95d02bfeab4bf995a254d49166b4ae62d1f21346
* | | Add missing @since 3.5 tag to RepoCommand.setIncludedFileReaderShawn Pearce2014-08-131-0/+1
| | | | | | | | | | | | Change-Id: Ib5d24f8dafacc0d12c36927c2bbc3ebef2fff7b2
* | | Add support to <include> tag in repo manifest xml.Yuxuan 'fishy' Wang2014-08-134-6/+117
| | | | | | | | | | | | | | | Change-Id: I32d468f92e24701ea680435bf3417e3850857303 Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
* | | Merge "Tweak the handling of remote url in jgit repo."Shawn Pearce2014-08-131-11/+6
|\ \ \
| * | | Tweak the handling of remote url in jgit repo.Yuxuan 'fishy' Wang2014-08-131-11/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This kind of reverted 31148. URI.resolve actually can handle the absolute URL well, the problem is only the missing "/". Change-Id: Iee5866c005cbc1430dc20ee7db321b8b51afed30 Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
* | | | Revert "Add a method to DfsOutputStream to read as an InputStream"Shawn Pearce2014-08-134-295/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit b646578d89513c5db30151f0b865c7335c88d682. openInputStream() is never used in JGit, nor is it used by any known working DFS implementation. The method was added as a utility for reading back from a DfsInserter, but the final implementation of that feature does not requrire this method. Change-Id: I075ad95e40af49c92b554480f8993ef5658f7684
* | | | Add a Merger.merge method that makes flushing optionalDave Borowitz2014-08-131-2/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows callers performing multiple separate merges to reuse a single ObjectInserter without flushing the inserter on each iteration (which can be slow in the DFS case). Change-Id: Icaff7d2bc2c20c873ce5a7d9af5002da84ae1c2b
* | | | Teach mergers to use ObjectInserter.newReader()Dave Borowitz2014-08-131-17/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows the RecursiveMerger to iteratively create new merge bases without necessarily flushing packs to storage in the DFS case; flushing only need happen at the end of the whole merge process. Since Merger's walk now depends on its inserter, we need to construct an inserter at Merger construction time. This should not be a significant increase in overhead since unused inserters don't use any resources (beyond a reference to the Repository). We also must release and recreate the walk whenever setObjectInserter is called, which can break usages where setObjectInserter is called in the middle of stateful operations on the walk. No usages of this method within JGit currently do this; the inserter is only ever set before any stateful walk operations happen. Change-Id: I9682a6aa4a2c37dccef8e163f132ddb791d79103
* | | | Add a method to ObjectInserter to read back inserted objectsDave Borowitz2014-08-137-2/+505
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the DFS implementation, flushing an inserter writes a new pack to the storage system and is potentially very slow, but was the only way to ensure previously-inserted objects were available. For some tasks, like performing a series of three-way merges, the total size of all inserted objects may be small enough to avoid flushing the in-memory buffered data. DfsOutputStream already provides a read method to read back from the not-yet-flushed data, so use this to provide an ObjectReader in the DFS case. In the file-backed case, objects are written out loosely on the fly, so the implementation can just return the existing WindowCursor. Change-Id: I454fdfb88f4d215e31b7da2b2a069853b197b3dd
* | / DfsInserter: buffer up to streamFileThreshold from InputStreamShawn Pearce2014-08-121-1/+15
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | Since 2badedcbe0f87c0a in-core merges can write up to 10 MiB into a TemporaryBuffer.Heap strategy, where the data is stored as a chain of byte[] blocks. Support the inserter reading up to the streamFileThreshold (default 50 MiB) from the supplied input stream and hash the content to determine if the merged result blob is already present in the repository. This allows the inserter to avoid creating duplicate objects in more cases, reducing repository pack file churn. Change-Id: I38967e2a0cff14c0a856cdb46a2c8fedbeb21ed5
* | Merger: clarify getBaseCommit javadocDave Borowitz2014-08-111-2/+6
| | | | | | | | Change-Id: Ic52475248a545d51d3d8ac31a24f0344a1241e45
* | Reuse Merger's ObjectReader from ResolveMergerDave Borowitz2014-08-111-26/+19
| | | | | | | | | | | | | | | | The base Merger class already has a single ObjectReader instance that it handles releasing as necessary, so creating new readers is not necessary. Change-Id: I990ec43af7df448c7825fc1b10e62eadaa3e0c2a
* | Merge "Fix CheckoutCommand not setting up tracking"Robin Rosenberg2014-08-114-42/+81
|\ \