summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Export all packages from org.eclipse.jgit.pgmTomasz Zarna2012-03-071-1/+4
| | | | Change-Id: I90565c8626aa5ab58ed3ff1dafa8bd21c9a79c62
* Remove ambiguous CheckoutConflictExceptionTomasz Zarna2012-03-065-8/+15
| | | | | | | | | Checkout command should throw o.e.j.api.errors.CheckoutConflictException which is a GitAPIException not o.e.j.errors.CheckoutConflictException. PullCommand should rethrow the API exception as a JGitInternalException. Bug: 356922 Change-Id: I865c4905997d9834c85a97fbe7287604daf99075 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Merge "Check connection's error stream before reading from it"Christian Halstrick2012-03-061-1/+5
|\
| * Check connection's error stream before reading from itKevin Sawicki2012-03-051-1/+5
| | | | | | | | | | | | | | | | HttpURLConnection.getErrorStream can return null which is currently not guarded against and will throw an NPE preventing the actual error response code from bubbling up. Change-Id: I04fb8dbda16b7df3b82fc579088a303b2fd21e87
* | Ignore /targetShawn O. Pearce2012-03-051-0/+1
| | | | | | | | | | | | | | | | | | | | Maven seems to be creating target/antrun/build-main.xml. This isn't a tracked file. Elsewhere we blanket ignore /target inside of each plugin/component directory so do the same at the top level. Change-Id: Id799ac6da65e6789e48e28efbdb455153b34ff2e Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* | Reuse Git object created in setUpKevin Sawicki2012-03-051-9/+9
| | | | | | | | | | | | | | | | Removes unneeded calls to Git.wrap in test cases where a valid Git object already exists as an instance variable. Change-Id: Id0e032d7886dfa6a3288321503a02743413f707d Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* | Set person and message on stash ref updateKevin Sawicki2012-03-052-2/+29
| | | | | | | | | | | | | | | | | | This will be the message and person used for the commit of stashed working directory changes. Bug: 372884 Change-Id: I2501b080f6b94e826cf7dba3fd526ae5c1d969d1 Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* | Return command from StashCreateCommand settersKevin Sawicki2012-03-051-2/+6
| | | | | | | | | | | | | | | | Previously were void which made them inconsistent with the fluid setter pattern used in other commands. Change-Id: Idb81dfc7bb097306f0c5d6e34f91a2bbab501668 Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* | Support insteadOf and pushInsteadOf URL replacementKevin Sawicki2012-03-052-2/+104
| | | | | | | | | | | | Bug: 346873 Change-Id: I4116328f93f411da56a633bc32fd064b2ac083f2 Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* | Merge "Quickfix for AutoCRLF handling"Chris Aniszczyk2012-03-054-5/+57
|\ \ | |/ |/|
| * Quickfix for AutoCRLF handlingRobin Rosenberg2012-03-034-5/+57
| | | | | | | | | | | | | | | | | | CRLF only works for small files, where small is the size of the buffer, i.e. about 8K. This QD fix reallocates the buffer to be large enough. Bug: 369780 Change-Id: Ifc34ad204fbf5986b257a5c616e4a8c601e8261a
* | RawText#getEOL() does the same thing as RawText#getLineDelimiter()Tomasz Zarna2012-03-053-21/+2
| | | | | | | | | | | | | | | | | | The duplication has been introduced when merging I08e1369e142bb19f42a8d7bbb5a7d062cc8533fc and I18adc63596f4657516ccc6d704a561924c79d445. The former should have been manually rebased. It also missed a copyright update in ApplyCommandTest. Change-Id: I18fe6108220f964524fb16b719604222aa7abee6
* | Merge "Update example code for obtaining a locked DirCache"Christian Halstrick2012-03-051-1/+1
|\ \
| * | Update example code for obtaining a locked DirCacheKevin Sawicki2012-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | | Previous example was calling a method that no longer exists on DirCache. Change-Id: I864842c58df4f116b318dc4a150b789745769a0d
* | | Add ApplyCommand to JGit APITomasz Zarna2012-03-0419-0/+807
| | | | | | | | | | | | | | | | | | | | | Bug: 361548 CQ: 6243 Change-Id: I08e1369e142bb19f42a8d7bbb5a7d062cc8533fc Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* | | Merge "Remove null access warning in DirCacheCheckout"Robin Rosenberg2012-03-041-14/+12
|\ \ \
| * | | Remove null access warning in DirCacheCheckoutKevin Sawicki2012-03-021-14/+12
| |/ / | | | | | | | | | | | | | | | | | | | | | Initially fill in the current DirCacheEntry field guarding against a null index tree and use that variable instead of calling getDirCacheEntry() on a possibly null DirCacheBuildIterator. Change-Id: I16f388a16636aefdb07d66dae5d05655009e2a0e
* / / Include eclipse.infMatthias Sohn2012-03-031-0/+1
|/ / | | | | | | | | | | | | | | | | Commit 9169e7f9ec281740b6d55586d91a82e4ea6d7399 failed to add org.eclipse.jgit/META-INF/eclipse.inf in order to fix bug 372845 since JGit is not yet built by Tycho. Hence explicitly including it. Bug: 372845 Change-Id: I6cb12327a237d69fbfe3d5e77d8a6ad7de442ad5 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Allow to get end-of-line characters for a RawTextTomasz Zarna2012-03-022-0/+58
| | | | | | | | | | Bug: 370320 Change-Id: I18adc63596f4657516ccc6d704a561924c79d445 Signed-off-by: Kevin Sawicki <kevin@github.com>
* | Load .gitmodules config before adding values to itSascha Scholz2012-03-022-4/+49
| | | | | | | | | | | | | | | | This prevents existing entries from being cleared when the .gitmodules config is saved after the new submodule configuration is added. Change-Id: I66841f5e758a7527e2e6e25cf1318e5fea91a909 Signed-off-by: Kevin Sawicki <kevin@github.com>
* | Merge "Exclude org.eclipse.jgit from pack200 packing"Christian Halstrick2012-03-021-0/+2
|\ \
| * | Exclude org.eclipse.jgit from pack200 packingMatthias Sohn2012-03-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems pack200 became unable to correctly pack the bundle org.eclipse.jgit (see bug 372845). Hence mark it to be excluded from this packing step following the workaround which worked for org.eclipse.jst.jsf.core (bug 335806). Bug: 372845 Change-Id: I2e3d20645ac49125472ddc235afbe9f3c7480caf Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Merge "Reuse existing modes and ids"Christian Halstrick2012-03-021-15/+13
|\ \ \ | |/ / |/| |
| * | Reuse existing modes and idsKevin Sawicki2012-02-291-15/+13
| | | | | | | | | | | | | | | | | | | | | | | | This change replaces calls to getEntryObjectId and getEntryFileMode with the existing method local variables for the index, merge, and head tree iterators. Change-Id: I75d1edfdd192a009fc916102ec052434c6302d00
* | | Extract filterCommands as a static method on ReceiveCommandDave Borowitz2012-02-292-13/+28
| | | | | | | | | | | | Change-Id: I24501f95185878d09b54562e48cb4e7e45dd3968
* | | Remove PreUploadHook.onPreAdvertiseRefsDave Borowitz2012-02-293-27/+0
| | | | | | | | | | | | | | | | | | AdvertiseRefsHook.advertiseRefs subsumes this behavior. Change-Id: Id2d1ebb2503c9ba79eda58aaea2fd76ec233427f
* | | Add an AdvertiseRefsHookChain, similar to the other hook chainsDave Borowitz2012-02-291-0/+98
| | | | | | | | | | | | Change-Id: I3bb0dc86047fe0446d18e0055f714092a658d228
* | | Modify refs in UploadPack/ReceivePack using a hook interfaceDave Borowitz2012-02-2911-93/+479
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is intended to replace the RefFilter interface (but does not yet, for backwards compatibility). That interface required lots of extra scanning and copying in filter cases such as only advertising a subtree of the refs directory. Instead, provide a hook that can be executed right before ref advertisement, using the public methods on UploadPack/ReceivePack to explicitly set the map of advertised refs. Change-Id: I0067019a191c8148af2cfb71a675f2258c5af0ca
* | | Fix a typo referring to RevFilter as RefFilterDave Borowitz2012-02-291-1/+1
| | | | | | | | | | | | Change-Id: I173efca7540b522d386216d1bd229e9a061263b2
* | | Minor javadoc wording fixes in ReceivePackDave Borowitz2012-02-291-2/+2
| | | | | | | | | | | | Change-Id: I5b409ef39aee890bcd7d4277e36b85ac4dc48281
* | | Expose an OutputStream from ReceivePack for sending client messagesDave Borowitz2012-02-291-12/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | Callers may want to format and flush their own output, for example in a PreReceiveHook that creates its own TextProgressMonitor. The actual underlying msgOut can change over the lifetime of ReceivePack, so we implement a small wrapper. Change-Id: I57b6d6cad2542aaa93dcadc06cb3e933e81bcd3d
* | | Allow creating ReceiveCommands with a specified typeDave Borowitz2012-02-291-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | This allows callers who know in advance whether a command is UPDATE or UPDATE_NONFASTFORWARD to specify this in the constructor rather than with a separate method call. Change-Id: Iae483594a4ff370ff75d17a7b0648c5590b3d1bd
* | | Execute ReceiveCommands via a method rather than in ReceivePackDave Borowitz2012-02-292-67/+79
|/ / | | | | | | | | | | | | | | This allows a PreReceiveHook to easily "take over" all of the ReceiveCommands passed to it, preventing any of them from being handled within the ReceivePack core. Change-Id: I2a8c1fc44e8dcadf22cd97a8ec4ee79d4d9d08f1
* | Add command support for applying a stashed commitKevin Sawicki2012-02-285-10/+567
| | | | | | | | | | | | | | | | | | Applies the changes in a stashed commit to the local working directory and index Bug: 309355 Change-Id: I9fd5ede8affc7f0060ffa7c5cec34573b6fa2b1b Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* | Add support for creating a stashed commitKevin Sawicki2012-02-285-0/+726
| | | | | | | | | | | | | | | | | | Adds a new command to stash the index and working directory changes in a commit stored in refs/stash Bug: 309355 Change-Id: I2ce85b1601b74b07e286a3f99feb358dfbdfe29c Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* | Add all paths option to CheckoutCommandKevin Sawicki2012-02-262-3/+32
| | | | | | | | | | | | | | This will perform the equivalent of running a 'git checkout -- .' at the root of a repository Change-Id: I3e2dd563700999bc063effdd3640499c8ed08136 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Let the date formatter pick the locale.Daniel Megert2012-02-253-5/+51
| | | | | | | | | | | | | | | | | | Instead of using the locale from the SystemReader we let the SystemReader create the date formats without passing the locale. Bug 368756 Change-Id: I6be9e07af804a08f3f3ac2d2d526ef594eed19e3 Signed-off-by: Daniel Megert <daniel_megert@ch.ibm.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Add support for autosetuprebase to the CloneCommandStefan Lay2012-02-232-0/+61
| | | | | | | | | | | | Bug: 345536 Change-Id: I93c609235dec4e5e3a2ddc275c28b202bf868d40 Signed-off-by: Stefan Lay <stefan.lay@sap.com> Signed-off-by: Kevin Sawicki <kevin@github.com>
* | Merge "Add IGNORE_ERRORS to FileUtils.delete()"Matthias Sohn2012-02-211-3/+10
|\ \
| * | Add IGNORE_ERRORS to FileUtils.delete()Christian Halstrick2012-02-211-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a few situations where you want to delete files or folders but where you are not interested in getting exceptions if this doesn't succeed. E.g. if you delete garbage in the GC class you want that if certain files can't be deleted the command succeeds. Maybe the next garbage collector run has more luck not to interfere with a virus scanner run on Windows. Therefore an option is added to FileUtils.delete() not to report errors in such cases. Change-Id: I58994d8c481e591dcbb0f2be7dfa562e125f0f08 Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
* | | Prepare 2.0.0-SNAPSHOT buildsMatthias Sohn2012-02-1640-245/+245
| | | | | | | | | | | | | | | Change-Id: I946e315af04227727ac937ebe9d70ae1ea4e8936 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Merge branch 'stable-1.3'Matthias Sohn2012-02-162-9/+235
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | * stable-1.3: Prepare post 1.3.0.201202151440-r build JGit 1.3.0.201202151440-r Generate conflicts and index updates on file mode changes Change-Id: Ie99780ef5cdea7b3ea1ea076282fe0a25f14f469 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | Prepare post 1.3.0.201202151440-r buildstable-1.3Matthias Sohn2012-02-1640-50/+50
| | | | | | | | | | | | | | | Change-Id: I4d695273e3151c22f2df9a58725cc7ba21ab6043 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | JGit 1.3.0.201202151440-rv1.3.0.201202151440-rMatthias Sohn2012-02-1540-50/+50
| | | | | | | | | | | | | | | Change-Id: I663208919f297836a9c16bf458e4a43ffaca4c12 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | Generate conflicts and index updates on file mode changesChristian Halstrick2012-02-132-9/+235
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handle more cases for file mode changes. Especially make sure that the following cases are handled correctly. Case 1) An entry in the working tree, HEAD tree, and merge tree have different modes and different content. Prior Outcome: Dirty working tree content is replaced and file mode changes are lost. New Outcome: Conflict is generated. Case 2) An entry in the index and merge tree have the same content but different modes but both modes are file type modes. Prior Outcome: File mode in working tree is not updated and the working directory is dirty. New Outcome: Index is updated and the working directory is clean. Bug: 363772 Change-Id: I224602d68228eb419813986807f1eeab77e9c302 Signed-off-by: Christian Halstrick <christian.halstrick@sap.com> Also-by: Kevin Sawicki <kevin@github.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Merge branch 'stable-1.3'Matthias Sohn2012-02-1310-63/+288
|\| | | |/ |/| | | | | | | | | | | | | | | | | | | * stable-1.3: Prepare post 1.3.0.201202121842-rc4 builds JGit 1.3.0.201202121842-rc4 Support gitdir references in working tree .git file Support committing submodule updates Update iplog tool's README Change-Id: Id70f4d4b059b03d4fa6fbd9137b81a337e9c48e8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Prepare post 1.3.0.201202121842-rc4 buildsMatthias Sohn2012-02-1340-50/+50
| | | | | | | | | | Change-Id: I50e0e6c2bccab5f3da62cbfe976f065169426906 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * JGit 1.3.0.201202121842-rc4v1.3.0.201202121842-rc4Matthias Sohn2012-02-1340-50/+50
| | | | | | | | | | Change-Id: I82c6c0c175ab6fb4e2113101f36c8d2ddf4a13c1 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Support gitdir references in working tree .git fileKevin Sawicki2012-02-087-51/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | A '.git' file in a repository's working tree root is now parsed as a ref to a folder located elsewhere. This supports submodules having their repository location outside of the parent repository's working directory such as in the parent repository's '.git/modules' directory. This adds support to BaseRepositoryBuilder for repositories created with the '--separate-git-dir' option specified to 'git init'. Change-Id: I73c538f6d845bdbc0c4e2bce5a77f900cf36e1a9 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Support committing submodule updatesKevin Sawicki2012-01-302-6/+109
| | | | | | | | | | | | | | Use the submodule object id provided by the working tree iterator Change-Id: Ibf82f56c04cb9c91b2b309cf0cfa3f638539e23c