summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* / / Ignore attempts to set the timeout to -1Jason Pyeron2012-09-101-2/+6
|/ / | | | | | | | | | | | | | | | | | | The value of -1 is the default value used by the underlying http transports provided by the jre. On some versions an attempt to set the timeout explicitly to -1 triggers a check condition, disallowing negative numbers. Bug: 389003 Change-Id: I74a22f8edc6c8e15843ad07c96a137739d9dcad1 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Mark fields of BaseReceivePack privateShawn O. Pearce2012-09-052-19/+36
| | | | | | | | | | | | | | | | | | | | | | None of these should have been exposed to base classes. The majority of them are private implementation details that are not required by a subclass in order to interact with the base protocol definition. The few that are needed should be visible as accessor methods, so the internals can be modified without breaking the public JGit API. Change-Id: I874179105c9c37703307facbbf99387c52bf772c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Delete checkObjectCollisions from PackParserShawn O. Pearce2012-09-051-46/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | This flag was added to provide an unsafe operation on the local repository because the storage.dht code was too damn slow to provide proper safe Git behavior all of the time. Now that stoarge.dht has been removed from the repository, also delete this unsafe flag to prevent applications from misusing the JGit library and permitting users to potentially damage their local repository with bad data received from an untrusted peer. Change-Id: Ib1861c48bb74836731e7b7d57b635dd654b0dc66 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Delete storage.dht packageShawn O. Pearce2012-09-05141-31637/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This experiment proved to be not very useful. I had originally planned to use this on top of Google Bigtable, Apache HBase or Apache Cassandra. Unfortunately the schema is very complex and does not perform well. The storage.dfs package has much better performance and has been in production at Google for many months now, proving it is a viable storage backend for Git. As there are no users of the storage.dht schema, either at Google or any other company, nor any valid open source implementations of the storage system, drop the entire package and API from the JGit project. There is no point in trying to maintain code that is simply not used. Change-Id: Ia8d32f27426d2bcc12e7dc9cc4524c59f4fe4df9 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Output result of switching branch -- o.e.jgit.pgm.CheckoutTomasz Zarna2012-09-057-5/+160
| | | | | | | | Change-Id: I9829950b686ce3b8c70b8f7a1774d5e2b55cd00a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Fix NPE when notes are presentRobin Rosenberg2012-09-051-1/+1
| | | | | | | | Change-Id: If9200ae4a7f582a5562aecf323ff0430ba154583 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | cleanup: use assertArrayEquals for assertion on arraysRobin Rosenberg2012-09-0310-45/+43
| | | | | | | | Change-Id: I1df945011f8e5f03959b693d3564fe357e707f91
* | cleanup: Prefer assertEquals over assertTrue(....equals(...))Robin Rosenberg2012-09-0313-44/+43
| | | | | | | | | | | | That is the common style and yields better diagnostics on failure. Change-Id: I831a55615a812734af0912a5d6bbfd1edc75308e
* | Merge "Support branches with name 'config'"Christian Halstrick2012-09-032-5/+30
|\ \
| * | Support branches with name 'config'Christian Halstrick2012-08-212-5/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | JGit was not able to lookup refs which had the name of files which exist in the .git folder. When JGit was looking up a ref named X it has a fixed set of directories where it searched for files named X (ignore packed refs for now). First directory to search for is .git. In case of the ref named 'config' it searched there for this file, found it (it's the .git/config file with the repo configuration in it), parsed it, found it is an invalid ref and stopped searching. It never looked for a file .git/refs/heads/config. I changed JGit in a way that when it finds a file in GIT_DIR which corresponds to a ref name and if this file doesn't contain a valid ref then it will ignore the InvalidObjectIdException and continue searching. Change-Id: Ic26a329fb1624a5b2b2494c78bac4bd76817c100 Bug: 381574 Signed-off-by: Christian Halstrick <christian.halstrick@sap.com> Signed-off-by: Stefan Lay <stefan.lay@sap.com>
* | | Merge "Add tests for more coverage of CheckoutCommand"Matthias Sohn2012-09-031-0/+65
|\ \ \
| * | | Add tests for more coverage of CheckoutCommandRobin Stocker2012-09-031-0/+65
| | | | | | | | | | | | | | | | | | | | Change-Id: Id3ab5f56f88d7e9636c71b30258c268a75fc422e Signed-off-by: Robin Stocker <robin@nibor.org> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | DirCacheCheckout: Fix handling of files not in indexRobin Stocker2012-09-013-23/+54
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a file is not in the index and neither contents nor mode differ between "head" and "merge", the index state should be kept. If they differ, a checkout conflict should occur. This is described in Git's git-read-tree.txt. JGit used to replace the index state with "merge" in both of the above cases. A confusing effect of this was that when one removed a file and then did a rebase, the file silently reappeared again. The changes to dir/file conflict handling are a consequence of this change, as the index handling change made tests in DirCacheCheckoutTest break. I compared these cases to C Git and the new behavior there also matches what C Git does. Bug: 387390 Change-Id: I5beb781f12172a68f98c67d4c8029eb51ceae62d Signed-off-by: Robin Stocker <robin@nibor.org>
* | | Create an input stream that transforms LF to CRLFRobin Rosenberg2012-09-012-0/+273
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The transformation is the same as AutoCRLFOutputStream does, but the direction is reversed. The tests are reused, but the implementation derives somewhat from the EolCanonicalizingInputStream. This stream will be used to compare blobs with LF line endings with worktree data that has CRLF line endings. Bug: 387501 Change-Id: I80d96e453e7f780dd464a89778de124cf35384e1 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Enhance statistics for repo by sizes and ref-countsChristian Halstrick2012-08-311-5/+40
| | | | | | | | | | | | | | | | | | | | | | | | The statistics for a repo now expose how many bytes are used in the filesystem to store all loose/packed objects. The number of packed/loose refs are also exposed. Change-Id: I335a4c7630a2629a86f13a2a5cd99f79a2c2afa4
* | | Implement a parser for datesChristian Halstrick2012-08-283-2/+468
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to parse user specified strings containing date and time info a thread-safe parser is implemented. This is needed for example to interpret configuration parameters (e.g. gc.pruneexpire where need to parse strings like "2 weeks ago"). The parser is thread-safe by caching SimpleDateFormat instances in a ThreadLocal cache. Native git has a parser called approxidate which is able to interpret a huge number of formats ("1 year ago", "tea time", ...). Ideally JGit should be able to parse the same strings as native git but for now this parser understands the following subset: "now" "yesterday" "(x) years|months|weeks|days|hours|minutes|seconds ago" "yyyy-MM-dd HH:mm:ss Z" (ISO) "EEE, dd MMM yyyy HH:mm:ss Z" (RFC) "yyyy-MM-dd" "yyyy.MM.dd" "MM/dd/yyyy" "dd.MM.yyyy" "EEE MMM dd HH:mm:ss yyyy Z" (DEFAULT) "EEE MMM dd HH:mm:ss yyyy" (LOCAL) Change-Id: Iccb66dadb60da13104e73140e53d5e2de068369c
* | | Merge "Fix gc's usage of progress monitor"Stefan Lay2012-08-281-22/+27
|\ \ \
| * | | Fix gc's usage of progress monitorMatthias Sohn2012-08-261-22/+27
| | | | | | | | | | | | | | | | Change-Id: I8dcdf0b83e91e6132dc490e8ec53818220773c94 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | Fix Jetty's p2 repository URLMatthias Sohn2012-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The Jetty 7.x p2 repository was moved to the archive server Change-Id: If864c64e8a64ced9b9b982332b412b367a6c1011 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | Update last jgit release version used in clirr API checksMatthias Sohn2012-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I20b1dd7d45eb7bb2644865f019ab726354c840c7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | Update maven plugin versionsMatthias Sohn2012-08-271-12/+12
| | | | | | | | | | | | | | | | | | | | Change-Id: I547e89b11eaa291f1e512a209ac49eaa15273b42 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | Enable rebase to continue for all rebase stagesRobin Rosenberg2012-08-271-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | EGit should be able to continue a rebase started by C Git. Change-Id: I63058026295fec34157b5687ae87ae9cb0c27c86 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | Merge "Refactor detection of Windows platform to SystemReader"Matthias Sohn2012-08-265-19/+16
|\ \ \ \
| * | | | Refactor detection of Windows platform to SystemReaderRobin Rosenberg2012-08-225-19/+16
| | | | | | | | | | | | | | | | | | | | Change-Id: Id0b8aef92f10572d4f1ec198e0281162fcd7ed4e