summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | Fix compatibilty breakage for SystemReaderRobin Rosenberg2011-10-231-11/+8
| |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introducing a new abstract method is not nice when one expects other to subclass them. Create default implementations so old code that implements SystemReader does not break. The default methods just delegate to the JVM. Change-Id: I42cdfdcb6b29f7203697a23833dca85185b0b9b3 Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
* | | | | Add locale to the properties manageable by SystemReaderRobin Rosenberg2011-10-202-0/+17
| | | | | | | | | | | | | | | | | | | | Change-Id: I5e9af40d38bb671cb9fcdb0fa3b4eb3af5f36f6c
* | | | | Add a method to SystemReader to get the time zoneRobin Rosenberg2011-10-203-3/+17
| | | | | | | | | | | | | | | | | | | | Change-Id: Ifd31f408ed2c5b7869694b715fea3219e74963ef
* | | | | Use the SystemReader to get system timeRobin Rosenberg2011-10-202-2/+11
|/ / / / | | | | | | | | | | | | Change-Id: Ib79c0cc964bfe799b204419e552b9aa6243966ce
* | | | Fix bad checkout behaviour when a file is removedRobin Rosenberg2011-10-182-6/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We deleted the entry if there was a file and an index entry, but not when there was just an index entry. Now delete the file in both cases since the missing file just means our worktree is dirty. This affected the implementation of reset --hard. Bug: 347574 Change-Id: Ie66fa61303472422830f5e33614e93ad65094e5d
* | | | Correct typo in RevWalk.parseBody commentKevin Sawicki2011-10-141-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I0e65a5a6809a8d32d256322dbcae94b6aa603e5e Signed-off-by: Kevin Sawicki <kevin@github.com>
* | | | Merge "Extend IndexDiff to calculate ignored files and folders"Christian Halstrick2011-10-102-3/+38
|\ \ \ \ | |_|/ / |/| | |
| * | | Extend IndexDiff to calculate ignored files and foldersJens Baumgart2011-10-052-3/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IndexDiff was extended to calculate ignored files and folders. The calculation only considers files that are NOT in the index. This functionality is required by the new EGit decorator implementation. Bug: 359264 Change-Id: I8f09d6a4d61b64aeea80fd22bf3a2963c2bca347 Signed-off-by: Jens Baumgart <jens.baumgart@sap.com>
* | | | Merge changes I7cdb563b,I7f60ae68,I7bd1e769,I92683805,I0e51a8e6Shawn O. Pearce2011-10-076-26/+164
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * changes: UploadPack: Fix races in smart HTTP negotiation PackWriter: Export more statistics Do not requeue state vector in stateless RPC fetch Wrap excessively long line in BasePackFetchConnection Fix smart HTTP client stream alignment errors
| * | | | UploadPack: Fix races in smart HTTP negotiationShawn O. Pearce2011-09-141-9/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clients cache the set of advertised references at the start of a negotiation, and keep replaying the same "want SHA1" list to the server on each negotiation step. If another client pushes into a branch and moves it by fast-forward, any request to obtain that branch's prior SHA-1 is still valid, the commit is reachable from the new position of the reference. Unfortunately the fast-forward causes smart HTTP negotations to fail, as the server no longer is advertising that prior SHA-1. Instead of causing clients to fail out with a "want invalid" error and forcing the end-user retry, possibly getting into a never ending try-fail-retry race while other clients are pushing into the same busy repository, allow the slightly stale want request so long as it is still reachable. C Git implemented this same change recently to fix races on the smart HTTP protocol when the C Git git-http-backend is used. The new RequestPolicy feature also allows server authors to make an even more lenient configuration that exports any SHA-1 to the client. This might be useful in certain settings where a server has authenticated the client as the "repository owner" and wants to allow them to grab any content from the server as a complete unbroken history chain. The new setAdvertisedRefs() method allows server authors to manually fix the references that are advertised, possibly bypassing the getAllRefs() call on the Repository object. Change-Id: I7cdb563bf9c55c83653f217f6e53c3add55a0541 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| * | | | PackWriter: Export more statisticsShawn O. Pearce2011-09-141-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Export the shallow pack information, and also a handy function to sum up the total times. Include the time writing out the index file, if it was created. Change-Id: I7f60ae6848455a357b25feedb23743bbf6c153cf Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| * | | | Do not requeue state vector in stateless RPC fetchShawn O. Pearce2011-09-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the no-done capability was enabled on the connection, don't queue up the state vector again once the ACK %s ready message is observed from the remote. The pack will be following in this response stream, so the state vector is no longer required. Change-Id: I7bd1e76957cb58c7ff1cdaeef227f1b02a7e5d24 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| * | | | Wrap excessively long line in BasePackFetchConnectionShawn O. Pearce2011-09-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I926838058c1de2146e22faa08570406600457acb Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| * | | | Fix smart HTTP client stream alignment errorsShawn O. Pearce2011-09-143-15/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The client's use of UnionInputStream was broken when combined with a 8192 byte buffer used by PackParser. A smart HTTP client connection always pushes in the execute stateless RPC input stream after the data stream has ended from the remote peer. At the end of the pack, PackParser asked to fill a 8192 byte buffer, but if only e.g. 1000 bytes remained UnionInputStream went to the next stream and asked it for input, which triggered a new RPC, and failed because there was nothing pending in the request buffer. Change UnionInputStream to only return what it consumed from a single InputStream without invoking the next InputStream, just in case that second InputStream happens to be one of these magical ones that generates an RPC invocation. Change-Id: I0e51a8e6fea1647e4d2e08ac9cfc69c2945ce4cb Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* | | | | Merge "Fix DirCacheEdtor.DeleteTree for empty string argument"Christian Halstrick2011-10-052-1/+121
|\ \ \ \ \
| * | | | | Fix DirCacheEdtor.DeleteTree for empty string argumentRobin Rosenberg2011-10-012-1/+121
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I7425da91c0752ae82484e3c29d21b57402d30c61
* | | | | | Add missing comment text for mergeCommitTree parameterKevin Sawicki2011-10-041-1/+1
| |_|/ / / |/| | | | | | | | | | | | | | | | | | | Change-Id: I35cef13d8be4f06515668f710fd508700b90f44d Signed-off-by: Kevin Sawicki <kevin@github.com>
* | | | | Do not attempt to resolve describe-labels with less than four digitsRobin Rosenberg2011-10-032-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I21dcd3cca3b41102fd898238d8d640dea25e0caf Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
* | | | | Add varargs version of PathFilterGroup.createFromStringsKevin Sawicki2011-09-301-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows the following usage pattern: PathFilterGroup.createFromStrings("path1", "path2"); Change-Id: I589e758cc55873ce75614602e017ac793435e24d Signed-off-by: Kevin Sawicki <kevin@github.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
* | | | | New config constant for default start-pointManuel Doninger2011-09-301-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This constant determine the default start-point, if the user don't want to create a branch from the current HEAD. Change-Id: Iea944e11e80134fbafc4c47383457d5ed11a4164 Signed-off-by: Manuel Doninger <manuel.doninger@googlemail.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
* | | | | Add blame unit test for file that is renamed twice.Kevin Sawicki2011-09-301-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 354507 Change-Id: I853774ecc1662d095a50a9668431c6e3ce4156c4 Signed-off-by: Kevin Sawicki <kevin@github.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
* | | | | Merge "Use bundle dependency for org.hamcrest.org"Robin Rosenberg2011-09-301-4/+4
|\ \ \ \ \
| * | | | | Use bundle dependency for org.hamcrest.orgMatthias Sohn2011-09-271-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is required to make org.eclipse.jgit.test compile when SWTBot isn't installed which should only be necessary for EGit developers. Change-Id: I7fc22ca9fc3048cdcf211c56612a3d1b8bed8f6e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | Fire IndexChangedEvent on DirCache.commit()Matthias Sohn2011-09-305-9/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we replaced GitIndex by DirCache JGit didn't fire IndexChangedEvents anymore. For EGit this still worked with a high latency since its RepositoryChangeScanner which is scheduled to run each 10 seconds fires the event in case the index changes. This scanner is meant to detect index changes induced by a different process e.g. by calling "git add" from native git. When the index is changed from within the same process we should fire the event synchronously. Compare the index checksum on write to index checksum when index was read earlier to determine if index really changed. Use IndexChangedListener interface to keep DirCache decoupled from Repository. Change-Id: Id4311f7a7859ffe8738863b3d86c83c8b5f513af Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | Remove TODO for generated constructor.Kevin Sawicki2011-09-281-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ie405f6de99b8fa632d7462400e647a37f30e2e31 Signed-off-by: Kevin Sawicki <kevin@github.com>
* | | | | | Fix status in index entries after checkout of pathsChristian Halstrick2011-09-282-22/+77
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The checkout command was producing an inconsistent state of the index which even confuses native git. The content sha1 of the touched index entries was updated, but the length and the filemode was not updated. Later in coding the index entries got automatically corrected (through Dircache.checkoutEntry()) but the correction was after persisting the index to disk. So, the correction was lost and we ended up with an index where length and sha1 don't fit together. A similar problem is fixed with "lastModified" of DircacheEntry. When checking out a path without specifying an explicit commit (you want to checkout what's in the index) the index was not updated regarding lastModified. Readers of the index will think the checked-out file is dirty because the file has a younger lastmodified then what's in the index. Change-Id: Ifc6d806fbf96f53c94d9ded0befcc932d943aa04 Signed-off-by: Christian Halstrick <christian.halstrick@sap.com> Signed-off-by: Jens Baumgart <jens.baumgart@sap.com> Bug: 355205
* | | | | Merge "Fix DirCache,getEntriesWithin for empty string arguemnt"Christian Halstrick2011-09-262-0/+12
|\| | | |
| * | | | Fix DirCache,getEntriesWithin for empty string arguemntRobin Rosenberg2011-09-252-0/+12
| | |/ / | |/| | | | | | | | | | Change-Id: I0bea130df611de3ef8c9251093b11c62b5442cd1
* | | | Merge "Remove duplicate calls to DirCache.unlock on checkout"Robin Rosenberg2011-09-251-6/+3
|\ \ \ \
| * | | | Remove duplicate calls to DirCache.unlock on checkoutKevin Sawicki2011-09-131-6/+3
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calls to unlock the DirCache before throwing an exception were not needed since checkout calls doCheckout wrapped in a try block that calls DirCache.unlock in a finally block. Change-Id: I2b249a784f9e363430e288aad67fcefb7fac0a6e Signed-off-by: Kevin Sawicki <kevin@github.com>
* | | | Merge "Document the show methods of RevWalkTextBuiltin"Robin Rosenberg2011-09-221-0/+22
|\ \ \ \
| * | | | Document the show methods of RevWalkTextBuiltinRobin Rosenberg2011-09-181-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ic704008cb215e1437c0a3fd1aec3aa38209ef3c7 Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
* | | | | Merge "Fix a boxing warning in org.eclipse.jgit.pgm.RevWalkTextBuiltin"Robin Rosenberg2011-09-221-2/+4
|\| | | |
| * | | | Fix a boxing warning in org.eclipse.jgit.pgm.RevWalkTextBuiltinRobin Rosenberg2011-09-181-2/+4
| |/ / / | | | | | | | | | | | | | | | | Change-Id: Ia154da79926ce25731e856bed264dd19a76bc1f1 Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
* | | | Merge "Remove use of GitIndex to detect index changes"Robin Rosenberg2011-09-221-7/+24
|\ \ \ \
| * | | | Remove use of GitIndex to detect index changesMatthias Sohn2011-09-161-7/+24
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | We can detect index changes using FileSnapshot. This is more efficient and removes usage of a deprecated class. Change-Id: I4a679102c9a1bd8e82b9ca93eb9dbbde445e9be4 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | Test the reflog message for commit, cherry-pick, revert and mergeRobin Rosenberg2011-09-214-1/+61
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I319f09577b3e04f6c31399fe8e57e9a9ad2c8a6c Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | Append merge strategy to reflog messageRobin Rosenberg2011-09-211-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ia0e73208b86c45a3d96698e973f6e70ec5cb7303 Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | Fix the reflog prefix for cherry-pick, revert and merge commandsRobin Rosenberg2011-09-214-10/+32
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | We should see whether the commit was a regular commit or something else. Change-Id: I82d8300cf3c53cb2bdcb6495386aadb803e0c6f7 Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Prepare 1.2.0 buildsMatthias Sohn2011-09-1540-241/+241
| | | | | | | | | | | | | | | Change-Id: I9ec247135d93ef28d732e94f18d0ec1d0e2e6d44 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Merge branch 'stable-1.1'Matthias Sohn2011-09-151-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | * stable-1.1: Prepare post v1.1.0.201109151100-r build JGit v1.1.0.201109151100-r Change-Id: I31a2e8d26d635ded9ea956a26ad9b2d9e20862a1 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | Merge branch 'stable-1.1'Matthias Sohn2011-09-111-1/+1
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-1.1: Allow commit when submodule changes are present Ignore submodule on checkout instead of deleting it cleanup: Reuse local variable for current DirCacheEntry Prepare post v1.1.0.201109071825-rc3 builds JGit v1.1.0.201109071825-rc3 Use commit message best practices for Mylyn Commit template Change-Id: I6ab9e5cb48c036d2ee2e548f5ec040d93672d8ad Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * | Fix IOOBE in Repository.resolveSimple()Dariusz Luksza2011-09-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IndexOutOfBoundException is thrown from Repository.resolveSimple() when '-g' string is located less then 4 characters from the end of this string. Change-Id: I1128c2cdfec9db3023d4d0f1f40d863e84b75950 Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
* | | | Prepare post v1.1.0.201109151100-r buildstable-1.1Matthias Sohn2011-09-1540-49/+49
| | | | | | | | | | | | | | | | | | | | Change-Id: Ib099ec93d8243b238641d79328216874532ab5eb Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | JGit v1.1.0.201109151100-rv1.1.0.201109151100-rMatthias Sohn2011-09-1540-49/+49
|/ / / | | | | | | | | | | | | Change-Id: Iadcec7e5973600e005cbdeb837fa197d3ae2ea86 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Allow commit when submodule changes are presentRobin Rosenberg2011-09-081-11/+19
| | | | | | | | | | | | | | | | | | | | | | | | We do not yet check or validate submodules, but can accept that someone staged a change in a submodule with other tools. Change-Id: I642ede382314bfbd1892dd509a2222885cc5350a Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
* | | Ignore submodule on checkout instead of deleting itRobin Rosenberg2011-09-081-16/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The purpose of this commit is to prevent destruction of submodules on checkout from a tree with a submodule to another. For consistency we handle the reverse case too, when we checkout a branch that has a submodule and the submodule directory exists. And finally we ignore the case where the submodule changes. We do not update the submodules, we just try to ignore them harder. Bug: 356664 Change-Id: I202c695a57af99b13d0d7220803fd08def3d9b5e Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
* | | cleanup: Reuse local variable for current DirCacheEntryRobin Rosenberg2011-09-081-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | Since we already have assigned i.getDirCacheEntry() to dce, use dce instead. Change-Id: I107713ad0b356516d75c29203f945b056bad3ac7 Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
* | | Prepare post v1.1.0.201109071825-rc3 buildsMatthias Sohn2011-09-0840-49/+49
| | | | | | | | | | | | | | | Change-Id: I1244f6639263d156a6f9e4530167e5eb1826a535 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | JGit v1.1.0.201109071825-rc3v1.1.0.201109071825-rc3Matthias Sohn2011-09-0840-49/+49
| | | | | | | | | | | | | | | Change-Id: I1b989d3101272632eacabe25a0b111ad0ff5bb3b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>