summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
Commit message (Collapse)AuthorAgeFilesLines
* JGit v2.3.0.201302060400-rc1v2.3.0.201302060400-rc1Matthias Sohn2013-02-063-4/+4
| | | | | Change-Id: Id1f1d174375f7399cee4c2eb23368d4dbb4c384a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Add getConflictingNames to RefDatabaseRobin Stocker2013-02-061-1/+40
| | | | | | | | | | | | | | | | | | This has the same logic as isNameConflicting, but instead of only returning a boolean, it returns a collection of names that conflict. It will be used in EGit to provide a better message to the user when validating a ref name, see Ibea9984121ae88c488858b8a8e73b593195b15e0. Existing implementations of isNameConflicting could be rewritten like this: return !getConflictingNames(name).isEmpty(); But I'm not sure about that, as isNameConflicting can be implemented in a faster way than getConflictingNames. Change-Id: I11e0ba2f300adb8b3612943c304ba68bbe73db8a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Merge "Extract method to output the first header line of a git diff"Robin Rosenberg2013-02-021-6/+27
|\
| * Extract method to output the first header line of a git diffTobias Pfeifer2013-01-301-6/+27
| | | | | | | | | | | | | | | | | | | | In order to be able to determine the range of the first header line (e.g. "diff --git a/file1 b/file2") in subclasses, the code that formats the first header line is extracted. Required by egit's change: Ia61398146c0336ab332234f24d341561292554db Change-Id: I9dd5eb964ed8b6869745c3162159b7425ac2c44a Signed-off-by: Tobias Pfeifer <to.pfeifer@sap.com>
* | Fixed problems occuring when changing user in gerrit configurationTobias Pfeifer2013-02-011-1/+1
| | | | | | | | | | Bug: 399238 Change-Id: I255634bc9b3681f292190051daed22a4771d6e57 Signed-off-by: Tobias Pfeifer <to.pfeifer@sap.com>
* | Fix stash apply using merge logicRobin Rosenberg2013-01-304-226/+132
|/ | | | | | | | | | | | Instead of the complicated strange stuff, implement staah apply as cherry-pick. Provided there are no conflicts and it is requested that the index should be applied, perform yet another cherry-pick, but discard tha results thereof it that would result in conflicts. Bug: 376035 Change-Id: I553f3a753e0124b102a51f8edbb53ddeff2912e2
* Fix Check for FF_ONLY merges againRobin Rosenberg2013-01-291-1/+1
| | | | | | Added more FF-mode tests Change-Id: I33eed5737d9411cc1cf214da62ce719916a1b736
* Merge "Check for FF_ONLY merges correctly"Robin Rosenberg2013-01-281-2/+2
|\
| * Check for FF_ONLY merges correctlyRobin Rosenberg2013-01-291-2/+2
| | | | | | | | | | Bug: 398192 Change-Id: I1253c0ea0632185bbf9f77e32f13ba5842a6e18e
* | Merge changes Ife0cc2da,If38507efRobin Rosenberg2013-01-282-30/+387
|\ \ | | | | | | | | | | | | | | | * changes: Speed up PathFilterGroup for large sets of paths Add test case for PathFilterGroup
| * | Speed up PathFilterGroup for large sets of pathsRobin Rosenberg2013-01-212-30/+387
| |/ | | | | | | | | | | | | The ByteArraySet is a distorted copy of ObjectIdSubclassMap. Bug: 397185 Change-Id: Ife0cc2da6cc46431be94a6b14f64f6adbe983afb
* | Merge "Reduce memory held and speed up DfsGarbageCollector."Colby Ranger2013-01-222-7/+18
|\ \
| * | Reduce memory held and speed up DfsGarbageCollector.Colby Ranger2013-01-222-7/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | getObjectList() returns a list of ObjectToPack. These can hold on to a lot of memory. Furthermore, binary searching for objects in a sorted array can be slow. Improve the speed and reduce the memory by creating a copy of the ObjectId and inserting it into an ObjectIdOwnerMap. Change-Id: Ib5aa5b7447e05938b47fa55812a87b9872c20ea7
* | | Enable marking entries using TreeFilters in DiffEntryRobin Stocker2013-01-234-3/+216
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a new optional TreeFilter[] argument to DiffEntry.scan. All filters will be checked during the scan to determine if an entry should be "marked" with regard to that filter. After having called scan, the user can then call isMarked(int) on the entries to find out whether they matched the TreeFilter with the passed index. An example use case for this is in the file diff viewer of EGit's History view, where we'd like to highlight entries that are matching the current filter. See EGit change I03da4b38d1591495cb290909f0e4c6e52270e97f. Bug: 393610 Change-Id: Icf911fe6fca131b2567514f54d66636a44561af1 Signed-off-by: Robin Stocker <robin@nibor.org> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Merge "Fix NPE FS_Win32 when looking up git executable and home directory ↵Matthias Sohn2013-01-221-3/+13
|\ \ \ | |_|/ |/| | | | | avoiding redundant code"
| * | Fix NPE FS_Win32 when looking up git executable and home directoryTobias Pfeifer2013-01-101-3/+13
| | | | | | | | | | | | | | | | | | | | | avoiding redundant code Bug: 397336 Change-Id: I60e1baa52e00c5ec3915b859bfc6a4572611cc89
* | | Merge "Improve handling of checkout conflicts"Robin Rosenberg2013-01-203-2/+80
|\ \ \
| * | | Improve handling of checkout conflictsMarkus Duft2013-01-113-2/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This converts a checkout conflict exception into a RebaseResult / MergeResult containing the conflicting paths, which enables EGit (or others) to handle the situation in a user-friendly way Change-Id: I48d9bdcc1e98095576513a54a225a42409f301f3
* | | | Merge changes I7e7fae12,I87ecca00Robin Rosenberg2013-01-192-32/+88
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | * changes: Add conflicts message before footer Only replace the ChangeId in the footer, not in the body
| * | | | Add conflicts message before footerStefan Lay2013-01-191-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case of a conflict during cherry-pick or revert the commit message was amended after the footer. This made the footer invalid. Many users do not understand that they have to edit the commit message in order to make it valid again. Change-Id: I7e7fae125129e2a0d8950510550acda766531835 Bug: 367416
| * | | | Only replace the ChangeId in the footer, not in the bodyStefan Lay2013-01-191-26/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Additionally expose methods to find the first footer line and to find the position of the ChangeId footer in the commit message in order to enable reuse of these methods introduced for the fix. Change-Id: I87ecca009ca3bff1ca0de3c436ebd95736bf5a10 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
* | | | | Merge "Use correct method link in Javadoc"Robin Rosenberg2013-01-192-4/+6
|\ \ \ \ \
| * | | | | Use correct method link in JavadocDani Megert2013-01-182-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I7fb5a44910a4738bbb14ad025cee7cbedbba2d07 Signed-off-by: Dani Megert <Daniel_Megert@ch.ibm.com>
* | | | | | Merge "Fix patch application WRT windows line endings."Robin Rosenberg2013-01-191-7/+4
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | |
| * | | | | Fix patch application WRT windows line endings.Markus Duft2013-01-191-7/+4
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the result of an application would have been \r\r\n in the case of windows line endings, as RawText does not touch the \r, and ApplyCommand adds "\r\n" if this is the ending of the first line in the target file. Only always adding \n should be ok, since \r\n would be the result if the file and the patch include windows line endings. Also add according test. Change-Id: Ibd4c4948d81bd1c511ecf5fd6c906444930d236e
* | | | | Merge "Update DfsGarbageCollector to not read back a pack index."Colby Ranger2013-01-185-28/+75
|\ \ \ \ \
| * | | | | Update DfsGarbageCollector to not read back a pack index.Colby Ranger2013-01-185-28/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the Dfs GC excluded objects from packs by passing a previously written index to the PackWriter. Reading back a file on Dfs is slow. Instead, allow the PackWriter to expose the objects included in a pack and forward that to invocations of excludeObjects() . Change-Id: I377cb4ab07f62cf790505e1eeb0b2efe81897c79
* | | | | | Merge "Define a tree filter for user-visible changes between two indexes"Robin Rosenberg2013-01-181-0/+105
|\ \ \ \ \ \ | |/ / / / / |/| | | | |
| * | | | | Define a tree filter for user-visible changes between two indexesRobin Rosenberg2013-01-151-0/+105
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The primary purpose of the filter is to detect an index change that could possibly lead to a change in what files are visible in the staging view and decorations. Besides what TreeFilter.ANY_DIFF does for trees in general, this filter also looks at the assume-valid (CE_VALID) flag to see whether changes should be ignored or not. Change-Id: I13e9ed4ae62dc3851204fba598239edce07ca977
* | | | | Merge "Add additional FastForwardMode enums for different config contexts"Shawn Pearce2013-01-183-4/+113
|\ \ \ \ \ | |_|/ / / |/| | | |
| * | | | Add additional FastForwardMode enums for different config contextsTomasz Zarna2013-01-183-4/+113
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | FastForwardMode is represented by different strings depending on context it is set or get from. E.g. FastForwardMode.FF_ONLY for branch.<name>.mergeoptions is "--ff-only" but for merge.ff it is "only". Change-Id: I39ae93578e4783de80ebf4af29ae23b3936eec47
* / / / Rename PackConstants to PackExt, a typed pack file extension.Colby Ranger2013-01-1711-55/+88
|/ / / | | | | | | | | | | | | | | | | | | | | | PackConstants previously contained string values for the pack and pack index extension. Change PackConstant to be PackExt, a typed wrapper around the string pack file extension. Change-Id: I86ac4db6da8f33aa42d6f37cfcc119e819444318
* | | Remove getReverseIndexSize() from DfsPackDescription.Colby Ranger2013-01-152-10/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | The method is used in only one location (DfsPackFile). Furthermore, PackIndex already does an explicit computation of the size in DfsPackFile. Simplify the DfsPackDescription by removing the method and do the calculation similar to PackIndex. Change-Id: I1391fdaaf7c2c3226d96ada1ae8647bcdff4794e
* | | Use file extension with DfsPackDescription get/set file size.Colby Ranger2013-01-156-40/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the size getters and setters had explicit methods for index and pack. Update the api to be based on the file extension. This will make it possible to support other extensions in the future, such as the forthcoming bitmap extensions. Change-Id: Iab9d4abe0af65b2fc71ad71ef1db0feb6b3b5c58
* | | Fix concurrent creation of fan-out object directoriesRoberto Tyley2013-01-131-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If multiple threads attempted to insert loose objects into the same new fan-out directory, the creation of that directory was subject to a race condition that could lead to an unnecessary IOException being thrown - because an inserter could not 'create' a directory that had just been generated by a different thread. All we require is that the directory does indeed *exist*, so not being able to _create_ it is not actually a fatal problem. Setting 'skipExisting' to 'true' on the call to mkdir() fixes the issue. I found this issue as a real world occurrence while working on The BFG Repo Cleaner (https://github.com/rtyley/bfg-repo-cleaner), a tool which concurrently performs a lot of object creation. In order to demonstrate the problem here I've added a small test case which reliably reproduces the issue on the few different hardware systems I've tried. The error thrown when the race-condition arises is this: java.io.IOException: Creating directory /home/roberto/repo.git/objects/e6 failed at org.eclipse.jgit.util.FileUtils.mkdir(FileUtils.java:182) at org.eclipse.jgit.storage.file.ObjectDirectory.insertUnpackedObject(ObjectDirectory.java:590) at org.eclipse.jgit.storage.file.ObjectDirectoryInserter.insertOneObject(ObjectDirectoryInserter.java:113) at org.eclipse.jgit.storage.file.ObjectDirectoryInserter.insert(ObjectDirectoryInserter.java:91) at org.eclipse.jgit.lib.ObjectInserter.insert(ObjectInserter.java:329) Change-Id: I88eac49bc600c56ba9ad290e6133d8a7113125ab
* | Accept '-' instead of space in enum config valuesShawn Pearce2013-01-111-0/+6
| | | | | | | | | | | | | | | | | | This is necessary because some versions of JGit containing the flawed c98abc9c0586c73ef7df4172644b7dd21c979e9d were used in the wild and wrote bad configuration files. We now must accept this value in addition to the preferred case. Change-Id: I3ed5451735658df6381532499130e5186805024a
* | Revert "Add additional FastForwardMode enums for different config contexts"Shawn Pearce2013-01-113-121/+2
| | | | | | | | | | | | This reverts commit c98abc9c0586c73ef7df4172644b7dd21c979e9d. Change-Id: I1d2a0de81eb17860ee36b6d3d3c00959b880fb85
* | Fix enum parsing from Config filesShawn Pearce2013-01-111-1/+1
| | | | | | | | Change-Id: Ib0b86ceab070d46903de7b55f2fd441714855141
* | Merge changes Ifc8fc3e5,I7c403b50Colby Ranger2013-01-1018-135/+153
|\ \ | | | | | | | | | | | | | | | * changes: Remove packIndex field from FileObjDatabase openPack method. Update DfsObjDatabase API to open/write by pack extension.
| * | Remove packIndex field from FileObjDatabase openPack method.Colby Ranger2013-01-107-30/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the FileObjDatabase required both the pack file path and index file path to be passed to openPack(). A future change to add a bitmap index will add a .bitmap file parallel to the pack file (similar to the .idx file). Update the PackFile to support automatically loading pack index extensions based on the pack file path. Change-Id: Ifc8fc3e57f4afa177ba5a88df87334dbfa799f01
| * | Update DfsObjDatabase API to open/write by pack extension.Colby Ranger2013-01-1011-105/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the DfsObjDatabase had a hardcoded getPackFile() and getPackIndex() methods which opens a .pack and .idx file, respectively. A future change to add a bitmap index will need to be stored in a parallel .bitmap file. Update the DfsObjDatabase to support opening and writing of files for any pack extension. Change-Id: I7c403b501e242096a2d435f6865d6025a9f86108
* | | Peel tags during resolve of foo^Dave Borowitz2013-01-101-1/+1
|/ / | | | | | | | | | | | | | | | | Once we start talking about parents of tags, we are in the commit graph, so treat all objects from this point as commits. This fixes spurious IncorrectObjectTypeExceptions on resolving expressions like tag^^. Change-Id: I29ece1fdb49c9c5b9ca415efcd1876bc72e97120
* | Merge "Revert "Speed up PathFilterGroup.include for large set of paths""Robin Rosenberg2013-01-091-55/+15
|\ \ | |/ |/|
| * Revert "Speed up PathFilterGroup.include for large set of paths"Robin Rosenberg2013-01-091-55/+15
| | | | | | | | | | | | | | | | This reverts commit 576e5acdd054e2dcd8cde3fe4d822bc3609850c1 The comparator is broken. Change-Id: Ic59110b154613f3ff4a215a6c1293a4c15cd3885
* | Merge "Consider that some Java version on Linux only return integral timestamps"Robin Rosenberg2013-01-081-1/+4
|\ \
| * | Consider that some Java version on Linux only return integral timestampsRobin Rosenberg2013-01-051-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | This logic is similar to what we do on Windows, but in this case it's Java that truncates the timestamps, not Git. Bug: 395410 Change-Id: Ie55dcb9fa583f5c3dd10d7a1b582e5b04b45858d
* | | Merge changes I3e9735c7,I76a16594Robin Rosenberg2013-01-082-27/+66
|\ \ \ | | |/ | |/| | | | | | | | | | * changes: Speed up PathFilterGroup.include for large set of paths Speed up handling of "only" paths in the CommitCommand
| * | Speed up PathFilterGroup.include for large set of pathsRobin Rosenberg2013-01-071-15/+55
| | | | | | | | | | | | | | | | | | | | | | | | This requires that we internally sort all paths so content of directories follow the directory immediately. Bug: 397185 Change-Id: I3e9735c7bdd99437929da8f9c9d4960a1273054b
| * | Speed up handling of "only" paths in the CommitCommandRobin Rosenberg2013-01-071-12/+11
| |/ | | | | | | | | | | | | Use binary search to reduce the number of lookups for very large number of paths. Change-Id: I76a16594b756bffd95298897414485a9cd637819
* | Return info about config subsection when trying to get an invalid enumTomasz Zarna2013-01-081-4/+6
| | | | | | | | Change-Id: Id4a72a68bdbd485619f4801683d38ad98f9841a2