aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Require a DiffConfig when creating a FollowFilterDave Borowitz2013-05-056-28/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The various rename detection options are an inherent part of the filter, similar to the path being followed. This fixes a potential NPE when a RevWalk with a FollowFilter is created without a Repository, since the old code path tried to get the DiffConfig from the RevWalk's possibly-missing repository. Change-Id: Idb273d5a92849b42935ac14eed73b796b80aad50
* | | Add optional feature to install Java 7 supportMatthias Sohn2013-05-0415-19/+481
| | | | | | | | | | | | | | | | | | Change-Id: I15cfd91857830d69abbe729be3e237fc9cd4fca0 Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Extend the FS class for Java7Robin Rosenberg2013-05-0465-61/+3024
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The most important difference is that in Java7 we have symbolic links and for most operations in the work tree we want to operate on the link itself rather than the link target, which the old File methods generally do. We also add support for the hidden attribute, which only makes sense on Windows and exists, just since there are claims that Files.exists is faster the File.exists. A new bundle is only activated when run with a Java7 execution environment. It is implemented as a fragment. Tycho currently has no way to conditionally include optional features based on the java version used to run the build, this means with this change the jgit packaging build always needs to be run using java 7. Change-Id: I3d6580d6fa7b22f60d7e54ab236898ed44954ffd Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Fix line endingsMatthias Sohn2013-05-035-335/+335
|/ / | | | | | | Change-Id: I61c9c173237a535da8576a9299bfd4bb29e8f56b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | TagCommand should be able to create unannotated tags tooRobin Rosenberg2013-05-034-45/+95
| | | | | | | | | | | | | | Using the low level API's is just too cumbersome. Change-Id: Id5b9f560ee095d6db0b2ea5b26aef3e53021626e Signed-off-by: Robin Stocker <robin@nibor.org>
* | Add test for RefUpdate delete without HEADRobin Stocker2013-05-031-1/+16
| | | | | | | | | | Bug: 406722 Change-Id: I555fb366ee64d885de2a71a67cf00833f4c62561
* | Merge "Fix warnings about assigning paramter in util.io"Robin Rosenberg2013-05-025-40/+43
|\ \
| * | Fix warnings about assigning paramter in util.ioRobin Stocker2013-05-015-40/+43
| | | | | | | | | | | | Change-Id: I08bed4275af9ec52aa4d7054067ac82f6a3c9781
* | | Update tags on fetch if --tags or tag refspec specifiedRobin Stocker2013-05-012-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When either --tags or a tag ref is explicitly specified on fetch, C Git updates existing local tags if they are different. Before this change, JGit returned REJECTED in such a case. Now it updates it and returns FORCED. Example: % mkdir a % cd a % git init -q % touch test.txt % git add test.txt % git commit -q -m 'Initial' % git tag v1 % cd .. % git clone -q a b % cd a % echo Test > test.txt % git commit -q -a -m 'Second' % git tag -f v1 Updated tag 'v1' (was bc85c08) % cd ../b % git fetch --tags - [tag update] v1 -> v1 Bug: 388095 Change-Id: I5d5494c2ad1a2cdb8e9e614d3de445289734edfe
* | | Only fetch tags that do not exist locally with auto-followRobin Stocker2013-05-012-27/+94
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This corresponds to what C Git does, quoting from the fetch man page: This is done by first fetching from the remote using the given <refspec>s, and if the repository has objects that are pointed by remote tags that it does not yet have, then fetch those missing tags. Before, JGit would also fetch tags that exist locally but point to a different object, resulting in REJECTED results for these. Also add some test cases to cover more cases. Bug: 388095 Change-Id: Ib03d2d82e9c4b60179d626cfd5174be1da6388b2 Also-by: Stefan Lay <stefan.lay@sap.com>
* | ArchiveCommand: Add missing @since tagJonathan Nieder2013-04-301-0/+2
| | | | | | | | Change-Id: I9e48a1f82b747492bebb3ca65fd16f599e425e8b
* | Abort before delete in FileUtils.delete EMPTY_DIRECTORIES_ONLY|RECURSIVERobin Stocker2013-04-292-2/+131
| | | | | | | | | | | | | | | | | | | | | | | | Depending on the order in which items are traversed for RECURSIVE, an empty directory may come first before detecting that there is a file and aborting. This fixes it by traversing files first. Bug: 405558 Change-Id: I638b7da58e33ffeb0fee172b96f4c823943d29e9 Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Merge "Cleanup imports and javadocs in ArchiveCommand"Robin Rosenberg2013-04-271-3/+6
|\ \
| * | Cleanup imports and javadocs in ArchiveCommandRobin Rosenberg2013-04-271-3/+6
| | | | | | | | | | | | Change-Id: Icb1cd177e791cc646636a88c67fd9399dfc7030c
* | | Delete CLIText strings previously used in iplog generatorJonathan Nieder2013-04-272-6/+0
| | | | | | | | | | | | | | | | | | | | | The only callers using these strings were removed in commit 850e5bc24e31 (Delete the iplog generator, 2013-01-09). Change-Id: Ia4f81b29b8d00782ee559d69de3befc0a6c4d403
* | | Merge "Make the Reflog a public API again"Robin Rosenberg2013-04-2724-103/+273
|\ \ \
| * | | Make the Reflog a public API againRobin Rosenberg2013-04-2624-103/+273
| | | | | | | | | | | | | | | | Change-Id: I8ced7098da5b345fd9af2fdfafd1ef6a44ccee0d
* | | | Merge "Remove unused logger from RecursiveMerger"Robin Rosenberg2013-04-271-3/+0
|\ \ \ \
| * | | | Remove unused logger from RecursiveMergerJonathan Nieder2013-04-261-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | JGit doesn't currently use java.util.logging.Logger. Remove this never-used Logger introduced in ab99b78ca08a (Implement recursive merge strategy, 2013-02-21) to make that easier to see. Change-Id: I92c578e7f3617085a667de7c992174057be3eb71
* | | | | Refer to getEntryPathLength in docs of getEntryPathBufferRobin Stocker2013-04-271-1/+8
| |_|_|/ |/| | | | | | | | | | | Change-Id: Icca41d80bd0791cd2d4bf03297795d161afbee70
* | | | Allow deletions to occur when there is no HEADAlex Blewitt2013-04-271-1/+1
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the HEAD is not present in a repository, then there is a NullPointerException thrown in the delete code. Since this only exists to verify if the deletion is not the HEAD reference, then skip this check if the HEAD cannot be found. Bug: 406722 Change-Id: I882497202d986096513a4d791cd07fa935a3f9e4 Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
* | | ArchiveCommand: Do not warn for unsupported file modeJonathan Nieder2013-04-263-13/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When ArchiveCommand is invoked directly on the command line, these warnings to stderr warning: mode of path/to/some/submodule ignored are a useful hint, but in the more usual case where an archive is being served by a server, the intended audience for that message cannot see stderr. Later it might be useful to accept a callback to return these warnings out of band. Change-Id: I22e79be69859176d85594031d67c6cb3371c4bd2
* | | Add internal porcelain-style API for ArchiveCommandJonathan Nieder2013-04-264-124/+288
| | | | | | | | | | | | | | | | | | | | | One step closer to exposing archive creation functionality in a org.eclipse.jgit.archive bundle. Change-Id: If0ebb2417a941d9d3fc0d3f444316d0d1c494ff3
* | | Merge "archive: Release resources before returning"Shawn Pearce2013-04-261-18/+22
|\ \ \ | |/ / |/| |
| * | archive: Release resources before returningJonathan Nieder2013-04-261-18/+22
| | | | | | | | | | | | | | | | | | | | | | | | The only caller exits immediately after calling execute() so this shouldn't make a difference, but it's good practice and should make it easier to expose the functionality in a public API later. Change-Id: Ia6cd2ce8382f1a62e576409107fc5c9a6b321fb6
* | | Merge "status: Print conflict description for unmerged paths"Robin Rosenberg2013-04-255-9/+77
|\ \ \ | |/ / |/| |
| * | status: Print conflict description for unmerged pathsRobin Stocker2013-04-195-9/+77
| | | | | | | | | | | | | | | | | | | | | Prefix unmerged paths with conflict description (e.g. "both modified:"), the same way C Git does. Change-Id: I083cd191ae2ad3e2460aa4052774aed6e36c2699
* | | Document RevTag#getObject() that returned object is unparsedRobin Stocker2013-04-221-1/+9
| | | | | | | | | | | | Change-Id: I238d388e40362721eecf37f64ad7d48a399ff129
* | | Improve class documentation of TagCommandRobin Stocker2013-04-221-4/+13
| | | | | | | | | | | | Change-Id: I9c636b927fa2d7cfbe1eb5535a9e702b2209f51d
* | | Revert "Add tests for FileUtils.delete and EMPTY_DIREECTORIES_ONLY"Shawn Pearce2013-04-191-85/+0
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 7aa54967a26cb027fe390ad1c624ebb30f9ac6d5. The unit test dependend upon the specific order of names that listFiles() returned members in. The order is completely undefined and may differ even on different versions of Linux based systems. A proper unit test for this code would have considered both cases, where the deletion function was able to remove an empty subdirectory, or fail to remove a subdirectory because a file was still present within. This is not such a test. Change-Id: Ib0a706fea01e4b1ed8c8e859247d247a1279b4bc
* | Create constants in ConfigConstants for the "diff" sectionRobin Rosenberg2013-04-192-8/+46
| | | | | | | | | | Change-Id: I5cf5fe60374d1e94eb031488e4f92c8e521f41a6 Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* | Fix examples with refs/heads/ in RefSpec JavadocRobin Stocker2013-04-191-8/+8
| | | | | | | | | | Change-Id: I06c1c7242a1b4c8f499c27a598cca714803799b7 Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* | IndexDiff: Provide stage state for conflicting entriesRobin Stocker2013-04-192-5/+181
|/ | | | | | | | | | | | | Adds a new method getConflictingStageStates() which returns a Map<String, StageState> (path to stage state). StageState is an enum for all possible stage combinations (BOTH_DELETED, ADDED_BY_US, ...). This can be used to implement the conflict text for unmerged paths in output of "git status" or in EGit for decorations/hints. Bug: 403697 Change-Id: Ib461640a43111b7df4a0debe92ff69b82171329c Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* Merge "A deleted work tree file is not a conflict when merge wants to delete it"Robin Rosenberg2013-04-192-1/+20
|\
| * A deleted work tree file is not a conflict when merge wants to delete itRobin Rosenberg2013-04-082-1/+20
| | | | | | | | | | Bug: 405199 Change-Id: I4b2ef3dc432d2fad8a6fabd1c8aec407b5c8c5ac Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
* | Merge "Untracked files should not be included in stash"Robin Rosenberg2013-04-192-3/+12
|\ \
| * | Untracked files should not be included in stashRobin Rosenberg2013-04-182-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | The previous code stashed untracked files and left them in the work tree. Bug: 403282 Change-Id: I71727addb2b55fb8e409cae2b6af8138b1ff7ef1
* | | Do not export package org.eclipse.jgit from jgit testsMatthias Sohn2013-04-191-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 3344b93c erroneously exported the package org.eclipse.jgit.lib from the org.eclipse.jgit.test bundle which made this a split package since the bundle org.eclipse.jgit exports the same package. Split packages are evil in general and most probably caused the build cycle errors observed recently when importing the jgit projects in Eclipse [1]. [1] http://dev.eclipse.org/mhonarc/lists/jgit-dev/msg02012.html Change-Id: I89919e56b928acdbff0b90e3919808025a8562c6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Remove some unnecessary dependencies on FileRepostoryRobin Rosenberg2013-04-1820-85/+70
| | | | | | | | | | | | | | | Change-Id: Ib6ee3a2874a7e2240aa68f4ac32d00c4d1fab5ae Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* | | Merge "Remove unused dependencies"Robin Rosenberg2013-04-188-24/+4
|\ \ \
| * | | Remove unused dependenciesMatthias Sohn2013-04-098-24/+4
| | | | | | | | | | | | | | | | Change-Id: I3cd161ac360a2e2635bffe309725a41c9527694e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | Improve test coverage of AutoCRLF(In|Out)putStreamRobin Stocker2013-04-183-19/+37
| | | | | | | | | | | | | | | | | | | | | | | | Bug: 405672 Change-Id: I3894e98617fcee16dc2ac9853c203c62eb30c3ab Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* | | | Merge changes Id2848c16,I7621c434Shawn Pearce2013-04-173-56/+243
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | * changes: Rescale "Compressing objects" progress meter by size Split delta search buckets by byte weight
| * | | | Rescale "Compressing objects" progress meter by sizeShawn Pearce2013-04-173-16/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of counting objects processed, count number of bytes added into the window. This should rescale the progress meter so that 30% complete means 30% of the total uncompressed content size has been inflated and fed into the window. In theory the progress meter should be more accurate about its percentage complete/remaining fraction than with objects. When counting objects small objects move the progress meter more rapidly than large objects, but demand a smaller amount of work than large objects being compressed. Change-Id: Id2848c16a2148b5ca51e0ca1e29c5be97eefeb48
| * | | | Split delta search buckets by byte weightShawn Pearce2013-04-173-42/+187
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of assuming all objects cost the same amount of time to delta compress, aggregate the byte size of objects in the list and partition threads with roughly equal total bytes. Before splitting the list select the N largest paths and assign each one to its own thread. This allows threads to get through the worst cases in parallel before attempting smaller paths that are more likely to be splittable. By running the largest path buckets first on each thread the likely slowest part of compression is done early, while progress is still reporting a low percentage. This gives users a better impression of how fast the phase will run. On very complex inputs the slow part is more likely to happen first, making a user realize its time to go grab lunch, or even run it overnight. If the worst sections are earlier, memory overruns may show up earlier, giving the user a chance to correct the configuration and try again before wasting large amounts of time. It also makes it less likely the delta compression phase reaches 92% in 30 minutes and then crawls for 10 hours through the remaining 8%. Change-Id: I7621c4349b99e40098825c4966b8411079992e5f
* | | | | Merge "Support excluding objects during DFS compaction"Shawn Pearce2013-04-171-31/+102
|\ \ \ \ \
| * | | | | Support excluding objects during DFS compactionShawn Pearce2013-04-161-31/+102
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By excluding objects the compactor can avoid storing objects that are already well packed in the base GC packs, or any other pack not being replaced by the current compaction operation. For deltas the base object is still included even if the base exists in another exclusion set. This favors keeping deltas for recent history, to support faster fetch operations for clients. Change-Id: Ie822fe075fe5072fe3171450fda2f0ca507796a1
* / | | | Make recursive merge strategy the default merge strategyMatthias Sohn2013-04-156-9/+10
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use recursive merge as the default strategy since it can successfully merge more cases than the resolve strategy can. This is also the default in native Git. Change-Id: I38fd522edb2791f15d83e99038185edb09fed8e1 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | Update PackBitmapIndexRemapper to handle mappings not in the new pack.Colby Ranger2013-04-151-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the code assumed all commits in the old pack would also be present in the new pack. This assumption caused an ArrayIndexOutOfBoundsException during remapping of ids. Fix the iterator to only return entries that may be remapped. Furthermore, update getBitmap() to return null if commit does not exist in the new pack. Change-Id: I065babe8cd39a7654c916bd01c7012135733dddf
* | | | Fix boundary conditions in AutoCRLFOutputStreamRobin Rosenberg2013-04-142-36/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes some problems with inputs around the size of the internal buffer in AutoCRLFOutputStream (8000). Tests supplied by Robin Stocker. Bug: 405672 Change-Id: I6147897290392b3bfd4040e8006da39c302a3d49