summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Provide a convenient read() in RepositoryTestCaseRobin Stocker2012-09-253-13/+27
| | | | | | | For reading a file by its repository-relative path, analogous to writeTrashFile. Change-Id: I112de0d57c2ee1bd425de6cbf561a57fea7147f0
* Merge "Allow @ in branch names and tighten syntax checking"Robin Rosenberg2012-09-242-7/+86
|\
| * Allow @ in branch names and tighten syntax checkingRobin Rosenberg2012-09-232-7/+86
| | | | | | | | | | | | | | | | | | | | Valid refs are defined by git-check-ref-format(1). In addition we will not try to perform a lookup of an invalid ref name in Repository.resolve(). Reported by R Shapiro in the Eclipse JGit Forum. Change-Id: I0b098eec9ecb98a9ce16b1cfb476729aaf2fb190
* | Merge "FileBasedConfig supports UTF-8 byte order marker"Robin Rosenberg2012-09-243-2/+196
|\ \
| * | FileBasedConfig supports UTF-8 byte order markerMarc Strapetz2012-09-243-2/+196
| | | | | | | | | | | | Change-Id: I1f5dc07182dbf6bba2a9f4807fdd25b475da4ead
* | | Merge "Fix typo in AnyObjectId#abbreviate"Robin Rosenberg2012-09-241-2/+2
|\ \ \
| * | | Fix typo in AnyObjectId#abbreviateRobin Stocker2012-09-241-2/+2
| | |/ | |/| | | | | | | Change-Id: I5796dc81727a8e1923189e9490a55c4af6ad053e
* | | Merge "Add toString for TrackingRefUpdate"Robin Rosenberg2012-09-241-0/+17
|\ \ \
| * | | Add toString for TrackingRefUpdateRobin Stocker2012-09-241-0/+17
| |/ / | | | | | | | | | | | | | | | | | | | | | Makes it much easier to debug the results of OperationResult#getTrackingRefUpdates (which otherwise requires digging into a TreeMap structure). Change-Id: I90da5385ee47c441404728f252eb3a100c48ee1c
* | | Merge "Refuse to checkout unmerged paths from index"Christian Halstrick2012-09-242-1/+29
|\ \ \
| * | | Refuse to checkout unmerged paths from indexRobin Stocker2012-09-232-1/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this check, the checkout was done but the result was a "both deleted" status when inspecting it with C Git. Found this while working on bug 390147. Change-Id: Ic3693f2c651827239e838bf7f37da842a7ae9707
* | | | Comment an empty block which is okRobin Rosenberg2012-09-231-0/+1
| | | | | | | | | | | | | | | | Change-Id: I552d4481e17a12b0bd707d5386f29026ae0856fb
* | | | Remove unnecessary @SuppressWarningsRobin Rosenberg2012-09-231-1/+0
| | | | | | | | | | | | | | | | Change-Id: Ic7b8494713d59574ee8f064a5c1042b48aedf012
* | | | Remove uses of TextBuiltin.out in favor of outwRobin Rosenberg2012-09-233-14/+18
| |/ / |/| | | | | | | | | | | | | | | | | These came from patches in review in parallel with the introduction of the exception throwing print writer. Change-Id: I1c27fa276eb1fcf12ad19792049c35cb52518c16
* | | Merge "The constructor CmdLineException(String) is deprecated"Robin Rosenberg2012-09-236-20/+36
|\ \ \ | |/ / |/| |
| * | The constructor CmdLineException(String) is deprecatedTomasz Zarna2012-09-236-20/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use CmdLineException(CmdLineParser, String) instead. The new constructor has been added in args4j 2.0.12, so in pom.xml that would be the minimum version. Set the upper boundary in pom.xml to 2.1.0 (exclusive), just like in the MANIFEST.MF. Change-Id: If45d809e4ffa11a3572d958ce121422fb03cf8f3 Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
* | | Merge changes Ic2b78ba9,Ia13e63edShawn O. Pearce2012-09-226-9/+17
|\ \ \ | |/ / |/| | | | | | | | | | | * changes: Use '406 Not Acceptable' when info/refs is disabled Compress large /info/refs responses on HTTP
| * | Use '406 Not Acceptable' when info/refs is disabledShawn O. Pearce2012-09-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of a confusing 403 Forbidden error indicating the dumb file service is disabled on this server, use 406 Not Acceptable to mean the client sent a request for content (the plain info/refs file) that this server does not want to provide. The stock C Git client will report HTTP 406 error if it predates 1.6.6 or something goes wrong with the smart request and it tried falling back to the dumb request. This may help to debug cases where a broken proxy server exists between the client and the server and has mangled a prior smart info/refs response. Change-Id: Ic2b78ba9502e4bbdff7cc3ba1fd284cf7616412b
| * | Compress large /info/refs responses on HTTPShawn O. Pearce2012-09-195-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable streaming compression for any response that is bigger than the 32 KiB buffer used by SmartOutputStream. This is useful on the info/refs file which can have many branches and tags listed, and is often bigger than 32 KiB, but also compresses by at least 50%. Disable streaming compression on large git-upload-pack responses, as these are usually highly compressed Git pack data. Trying to compress these with gzip will only waste CPU time and additional transfer space with the gzip wrapper. Small git-upload-pack data is usually text based negotiation responses and can be squeezed smaller with a little bit of CPU usage. Change-Id: Ia13e63ed334f594d5e1ab53a97240eb2e8f550e2
* | | Suppress boxing warnings where we know they are okRobin Rosenberg2012-09-2226-50/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | Invoke the wrapper types' valueOf via static imports. For booleans used in asserts, add a new assert in the JUnit utility package since out current version of JUnit does not have the assert(boolean, boolean) method. Change-Id: I9099bd8efbc8c133479344d51ce7dabed8958a2b
* | | Merge "Fixed instability in some GC tests."Matthias Sohn2012-09-201-11/+7
|\ \ \
| * | | Fixed instability in some GC tests.Sasa Zivkov2012-09-201-11/+7
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some GC tests were sporadically failing. The reason was that they used the setExpireAgeMillis method to define object expiration before invoking the prune method. Depending on the CPU load during the test run, the prune method may reach an object (which is considered non-expired by the test) too late and actually prune it. To make the test stable we now use the setExpire(Date expire) method and define a time instant before which objects are considered to be expired. This way the outcome of the prune method doesn't depend on the CPU load. Change-Id: Ifc3323ca55ae56dbccdbc90a282ec3cf18ad7297 Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
* / / Fix the javadoc for GC.setExpireSasa Zivkov2012-09-201-3/+6
|/ / | | | | | | | | | | | | | | Clarify expiration of objects with the modification time exactly at the given time instant. Change-Id: I2000aec89c8d6a95700380b0a32275d2d658f67e Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
* / Use x-friends instead of x-internal to expose jgit for internal useRobin Rosenberg2012-09-191-1/+1
|/ | | | | | | This prevents a lot of unnecessary warnings about disouraged usage of the org.eclipse.jgit.internal package within JGit itself. Change-Id: Ia6683902809425fd7245e7d5d344c2ff8f317ebb
* Prepare 2.2.0 buildsMatthias Sohn2012-09-1941-235/+235
| | | | | Change-Id: I386ba70541d644e58661d26713b309371e0f9257 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Merge branch 'stable-2.1'Matthias Sohn2012-09-197-45/+203
|\ | | | | | | | | | | | | | | | | | | | | | | * stable-2.1: Prepare for 2.1 maintenance changes JGit v2.1.0.201209190230-r Introduce "never" as parseable date Introduce ParseExceptions for GitDateParser Support config param "gc.pruneexpire" Change-Id: If149d7f968a3425d9425f6ba9ce135a8341776a7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Prepare for 2.1 maintenance changesstable-2.1Matthias Sohn2012-09-1941-52/+52
| | | | | | | | Change-Id: I436f36a7c6dc86916eb4cde038b27f9fb183465a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * JGit v2.1.0.201209190230-rv2.1.0.201209190230-rMatthias Sohn2012-09-1941-52/+52
| | | | | | | | | | Change-Id: I9f94bce9a25644575a068c8fa459f74e06b02030 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Introduce "never" as parseable dateRobin Rosenberg2012-09-182-0/+21
| | | | | | | | | | | | | | | | | | | | For configuration parameter like "gc.pruneexpire" we need to understand the value "never". Never is handled as a date so far into the future that it will never happen. The actual value currently used is the constant GitDateParser.NEVER. Change-Id: I7744eaee9bf5026da517151c212c88325c348d6c Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
| * Introduce ParseExceptions for GitDateParserChristian Halstrick2012-09-176-41/+137
| | | | | | | | | | | | | | | | | | Instead of just returning null when something was not parseable we should throw a real ParseException. This allows us to distinguish between specifications which are unparseable and those which represent no date (e.g. "never") Change-Id: Ib3c1aa64b65ed0e0270791a365f2fa72ab78a3f4
| * Support config param "gc.pruneexpire"Christian Halstrick2012-09-172-4/+45
| | | | | | | | | | | | | | Make GC honor the config parameter gc.pruneexpire. If the parameter is not set then the default is "2.weeks.ago" Change-Id: I0ae0ca85993cafb4bc75ba80504da18544894ec3
* | Merge "Fix resolving expression with ~ and ^ than extends beyond history"Robin Rosenberg2012-09-186-10/+492
|\ \
| * | Fix resolving expression with ~ and ^ than extends beyond historyDave Borowitz2012-09-182-1/+27
| |/ | | | | | | | | | | | | | | | | | | | | | | resolve("foo~X") where X is greater than the distance from foo to the root should return null, but 2a2362fb introduced a bug causing it to either return resolve("foo") or NPE. Add a test for the correct behavior. Also add an analogous test for foo^X where X is greater than the number of parents (which was not broken by that commit). Change-Id: Ic580081ece57c8c2df29b652897b425ecb34e11f
| * Additional unit tests for the GCSasa Zivkov2012-09-163-2/+465
| | | | | | | | | | Change-Id: Id5b578f7040c6c896ab9386a6b5ed62b0f495ed5 Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Remove protobuf from top-level pom.xmlShawn O. Pearce2012-09-111-7/+0
| | | | | | | | | | | | | | This dependency is unused, and does not need to be version-managed in the top-level pom.xml anymore. Change-Id: I240d21b6478e15b05e679b8d976af171d81a524e
* | Add tests for output result of merging -- org.eclipse.jgit.pgm.MergeTomasz Zarna2012-09-175-1/+99
| | | | | | | | Change-Id: I888c7e80503b869d65a9617e6a07e01d1ff5f197
* | Merge "Suppress two resource warnings"Shawn Pearce2012-09-161-0/+2
|\ \
| * | Suppress two resource warningsRobin Rosenberg2012-08-171-0/+2
| | | | | | | | | | | | Change-Id: I829bb135b2347f79aa6d8979a0934042e40d212f
* | | Check for write errors in standard out and exit with errorRobin Rosenberg2012-09-1642-228/+439
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The underlying problem is that System.out is a PrintWriter and as such it does not throw exceptions on error, but rather just sets a flag and continues. This changes replaces the use of System.out with a PrintWriter-like writer that does not catch error, but instead throw them to the caller. Bug: 366243 Change-Id: I44405edc4416e943b87f09a0f6ed041c6c51b046
* | | Merge changes I8449695e,Idecd8018Shawn Pearce2012-09-1610-76/+80
|\ \ \ | | | | | | | | | | | | | | | | | | | | * changes: Use assertEquals instead of == for literal primitives Use assertTrue/False instead of equals with boolean literals
| * | | Use assertEquals instead of == for literal primitivesRobin Rosenberg2012-09-167-14/+13
| | | | | | | | | | | | | | | | Change-Id: I8449695ecc94a423369a7644a6ec93cf0cacef5d
| * | | Use assertTrue/False instead of equals with boolean literalsRobin Rosenberg2012-09-164-62/+67
| | | | | | | | | | | | | | | | | | | | | | | | This include replacing assertTrue(!..) with assertFalse() Change-Id: Idecd8018641454e10127d82ea3ddda3f671489ef
* | | | Merge "Ignore non-commit refs when in RevWalkUtils.findBranchesReachableFrom"Robin Rosenberg2012-09-141-1/+4
|\ \ \ \ | |/ / / |/| | |
| * | | Ignore non-commit refs when in RevWalkUtils.findBranchesReachableFromRobin Rosenberg2012-09-081-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | This methods is for finding branches only. Change-Id: Ic68b5295ff814401890f0592ae95851554706ca6
* | | | [findBugs] Silence warning about Transport initializationRobin Stocker2012-09-141-0/+6
| | | | | | | | | | | | | | | | | | | | Change-Id: I98fc9720106bcd873b330090bafde276508f8a40 Signed-off-by: Robin Stocker <robin@nibor.org> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | Fix ResolveMerger issue with submodule conflictTommi Siivola2012-09-121-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ResolveMerger throws a MissingObjectException when it encounters a submodule conflict while merging. The reason is that it treats the submodule link as a blob and tries to read its contents. We solve the issue by detecting before content merge whether the path to be merged is a submodule link, and skip the content merge if it is. Bug: 389238 Change-Id: I9a58dfc7716b28a21f5c04cf3a865091ae8dfe7e Signed-off-by: Tommi Siivola <tommi.siivola@eficode.com>
* | | | Merge "Added new Status CLI command 'jgit status'"Matthias Sohn2012-09-117-2/+448
|\ \ \ \ | |_|_|/ |/| | |
| * | | Added new Status CLI command 'jgit status'Robin Rosenberg2012-09-097-2/+448
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a first basic implementation that displays current branch and list of files of various status, but isn't as refined as its native counterpart (e.g. does not say if we're ahead or behind the remote). It's been helpful in the diagnostic of bug #347885. Bug: 348318 CQ: 6769 Change-Id: Ifc35da608fbba652524c1b5b522e3c0d5369ad5e Signed-off-by: François Rey <eclipse.org@francois.rey.name> Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
* | | Merge "README: Convert to Markdown and rename to README.md"Matthias Sohn2012-09-101-12/+24
|\ \ \
| * | | README: Convert to Markdown and rename to README.mdRobin Stocker2012-09-081-12/+24
| |/ / | | | | | | | | | | | | | | | | | | | | | This makes it display nicely on the GitHub mirror repository. And it is still very pleasant to read in plain text. Change-Id: I0c5e1caa58a22684cdbd9a02e9ec38e97d5adb1a Signed-off-by: Robin Stocker <robin@nibor.org>