summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* JGit v3.4.0.201405281120-rc2v3.4.0.201405281120-rc2Matthias Sohn2014-05-2855-59/+59
| | | | | Change-Id: Ifd376f58cf867fc84d39582c49e971d998abf63d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix authentication type names broken by 0b5441a8Matthias Sohn2014-05-271-3/+30
| | | | | | | | | | | | | | | | | | | 0b5441a8 introduced an enum for authentication types and changed the case of digest and basic authentication type names to all uppercase. This broke digest authentication at least when using Gerrit as the git server. According to RFC2617 [1] "Basic" and "Digest" is the literal to be used in authentication headers and not "BASIC" [1] and "DIGEST" [2]. According to RFC4559 "Negotiate" [3] is used for SPNEGO based authentication. [1] http://tools.ietf.org/html/rfc2617#page-5 [2] http://tools.ietf.org/html/rfc2617#page-8 [3] http://tools.ietf.org/html/rfc4559#page-3 Bug: 435866 Change-Id: I6173aff9352d7def225cafe2d73e5176ad40dff0 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Update Luna target platform to Orbit release R20140525021250Matthias Sohn2014-05-261-1/+1
| | | | Change-Id: Id46d74e9b11b2a7ea78d17b8bc12c3ad027723f1 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Allow to include untracked files in stash operations.Andreas Hermann2014-05-226-18/+295
| | | | | | | | | | | Unstashed changes are saved in a commit which is added as an additional parent to the stash commit. This behaviour is fully compatible with C Git stashing of untracked files. Bug: 434411 Change-Id: I2af784deb0c2320bb57bc4fd472a8daad8674e7d Signed-off-by: Andreas Hermann <a.v.hermann@gmail.com>
* Fix for reflog corruption caused by multiline messageAndreas Hermann2014-05-222-1/+97
| | | | | | | | | | | | | | | | | If a client passes a multiline message as argument to ReflogWriter.log() the Reflog gets corrupted and cannot be parsed. ReflogWriter.log() is invoked implicitly from various commands such as StashCreate, Rebase and many more. However the message is not always filtered for line feeds. Such an example is the StashCreateOperation of EGit which passes unchecked user input as commit message. If a multiline comment is pasted to the stash create dialog, the reflog gets corrupted. ReflogWriter now replaces line endings in log message with spaces. Bug: 435509 Change-Id: I3010cc902e13bee4d7b6696dfd11ab51062739d3 Signed-off-by: Andreas Hermann <a.v.hermann@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Improve layout of branches in the commit graphKonrad Kügler2014-05-224-147/+604
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The aim of this change is to place all commits of a branch on the same lane and commits of other (side) branches on different lanes. The algorithm treats first parents of a commit specially by placing them on the same lane as the commit itself. When a commit is the first parent of multiple children it could be placed on any of these children's lanes. In this case it is placed on the longest child lane, as this is usually the lane of the branch the commit actually was made on. Other (non-first) parents are placed on new lanes. This creates a layout that should make it easier to see branches and merges and follow linear branch histories. This differs from the previous approach, which sometimes plotted the commits of a side branch on the same lane as the base branch commits and further commits on the base branch appeared on a different lane. This made the base branch appear as if it was the side branch and the side branch appears to be the base branch. In addition to lane assignment, also the plotting code changed to start drawing a branch lane from the commit where it forks out. Previously it started only when the first commit on the branch appeared. Active lanes are continued with every commit that is processed. Previously lanes were only continued when the next commit on the lane was encountered. This could produce (temporarily) dangling commits if the next commit on the lane was not processed yet. CQ: 8299 Bug: 419359 Bug: 434945 Change-Id: Ibe547aa24b5948ae264f7d0f56a492a4ef335608 Signed-off-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* PlotCommitList: Remove handling of children that have no lane yetKonrad Kügler2014-05-221-14/+1
| | | | | | | | | | | | | | | | | | Child commits always have a lane assigned when their parents are processed, so this code is no longer necessary. Children only assign themselves to parents in PlotCommitList.setupChildren(), which is called from enter(), when the child is processed. If the child leaves enter() it should always have a lane assigned. As a result of this, when processing a parent, all its known children already have lanes assigned. If the underlying RevWalk emits a parent before one of its children (which it should not do), the parent does not know of the child emitted later, because setupChildren() has not been called for the child yet. So even in this case, no child without a lane is encountered when processing a (parent) commit. Change-Id: I982adc5c114370ecfd699d96221a76463de900ca Signed-off-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* PlotCommitList: Refactor lane creation and position allocationKonrad Kügler2014-05-221-20/+39
| | | | | | | | | This also properly removes the newly determinded lane position from the freePositions set in handleBlockedLanes(). closeLane() does only recycle active lanes, to avoid recycling lanes twice. Change-Id: Icd019fcf7974441ed05686bb61d6de4e8bf4ab7c Signed-off-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Add missing since tagsMatthias Sohn2014-05-212-0/+3
| | | | Change-Id: I6090b81aa963731af369babbe71b05ac817ee3dc Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Remove usage of IOException(Throwable) not available on Java 5Matthias Sohn2014-05-211-1/+3
| | | | Change-Id: I386aa77fb78bed3fb38a3ce46eaeb47df95fdde3 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare post 3.4.0 RC1 buildsMatthias Sohn2014-05-2155-59/+59
| | | | Change-Id: Ia8d29046439bc9134acdf7c88ab85ea49c4ddf47 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v3.4.0.201405211411-rc1v3.4.0.201405211411-rc1Matthias Sohn2014-05-2155-59/+59
| | | | | Change-Id: Ia3834770b9719f64cbdfd0338034c392fa3ae5db Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Add script to create JGit releaseMatthias Sohn2014-05-211-0/+52
| | | | | Change-Id: I620a209406dd021f3e8e1dafcfb381631dfd25d2 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Adds support for SPNEGOLaurent Goujon2014-05-212-0/+72
| | | | | | | | | | Adds support for Negotiate(SPNEGO) HTTP authentication method. This method is set to have a higher priority as Digest HTTP authentication method. Bug: 428836 Change-Id: Ib181096d39f538df1dd7d3f36516843777bf12ae Signed-off-by: Laurent Goujon <lgoujon@twitter.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
* Creates HttpAuthMethod type enum to support auth orderingLaurent Goujon2014-05-212-18/+76
| | | | | | | | | | Refactors HttpAuthMethod to support more authentication methods, still sorted by priority orders. Bug: 428836 Change-Id: I049c1742e7afbc51f3f6033fa4d471b344813cfa Signed-off-by: Laurent Goujon <lgoujon@twitter.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
* Detects background authentication and force use of jgit authenticationLaurent Goujon2014-05-211-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Sun HttpURLConnection is able to handle authentication like SPNEGO without caller intervention. However, there are some restrictions: - do not need user direct input (user,password for example) - it doesn't work when request body is chunked/streamed (because it cannot be replayed) Unfortunately there is no real way to leverage HttpURLConnection authentication work as the authentication header is stripped off the request before returning to the caller. There's also no way to explicitly disable authentication in HttpURLConnection (SPNEGO auth will always be attempted if a valid token can be created by GSSAPI). This is an issue for jgit since it is expected that the first request will be used to detect authentication method, and reuse for the subsequent requests. This patch modifies TransportHTTP to detect authentication done in the background by HttpURLConnection and sets the jgit authentication method accordingly so it will always work for future requests (assuming that the authentication method used by HttpURLConnection is also supported by jgit). Bug: 428836 Change-Id: I79f3b70ca2b8377e20da8e6a01914e43e96595ce Signed-off-by: Laurent Goujon <lgoujon@twitter.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
* Adds GSSManager factory class, to be used for SPNEGO HTTP authenticationLaurent Goujon2014-05-211-0/+158
| | | | | | | | | | | | | | | | | Adds a factory class for GSSManager. GSSManager is already a factory class but it doesn't work well with SPNEGO HTTP authentication unless the javax.security.auth.useSubjectCredsOnly system property is set to false. On Sun JDK, Sun GSSManagerImpl can be configured directly for SPNEGO auth (without setting any system property). For a better experience, the class availability is detected by reflection and used instead. Detection is only done once, and fallbacks to org.ietf.jgss.GSSManager. Bug: 428836 Change-Id: Idb9123d1f4013966919db43043ec959d4b133ae2 Signed-off-by: Laurent Goujon <lgoujon@twitter.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
* blame: Revert common subtree elimination "optimization"Shawn Pearce2014-05-192-42/+3
| | | | | | | | | | | | | | | | This partially reverts 6de12836d72fe4cba9afc297c8988c6fff851fa9. Performing a TreeWalk over 2 trees to identify and skip unmodified subtrees to pass all blame onto an ancestor appears to be a micro optimization that works for a very limited number of files. In the general case the 2 tree walk is slowing down blame more than it helps to speed it up. I keep coming up with files in multiple repositories where 6de128 is making things worse, not better, and only one example where it actually improved performance, render_view_impl.cc in chromium as described in the commit message. Change-Id: Ic6d5fff22acb5ab6485614a07bdb388e8c336679
* Merge "Cherry-Pick: Support --mainline to pick merges"Robin Rosenberg2014-05-194-9/+101
|\
| * Cherry-Pick: Support --mainline to pick mergesKonrad Kügler2014-05-174-9/+101
| | | | | | | | | | | | | | | | By specifying a mainline parent, a merge is cherry picked as if this parent was its only parent. If no mainline parent is given, cherry picking merges is not allowed, as before. Change-Id: I391cb73bf8f49e2df61428c17b40fae8c86a8b76 Signed-off-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de>
* | Fix a number of failing conflict situationsRobin Rosenberg2014-05-175-46/+486
| | | | | | | | | | | | | | | | | | | | | | | | | | Adds further tests where the working tree is dirty (differs from index) and where we have staged but uncommitted changes. Fixed the test case 9 for file/directory conflicts. Bug: 428819 Change-Id: Ie44a288b052abe936ebb74272d0fefef3b218a7a Signed-off-by: Axel Richard <axel.richard@obeo.fr> Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com> Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
* | Merge "Archive: Add the ability to select one or more paths."Robin Rosenberg2014-05-172-0/+236
|\ \
| * | Archive: Add the ability to select one or more paths.Shaul Zorea2014-05-142-0/+236
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, it was only possible to archive the entire repository. This patch introduces the ability to select specific files and directories to archive. Archiving the entire repository remains the default behaviour. org.eclipse.jgit.api.ArchiveCommand: Adding setPaths(String... paths) method. Change-Id: Iedcd40fbfd71238b0088174bbe2717fae196e047 Signed-off-by: Shaul Zorea <shaulzorea@gmail.com>
* | | Fix failing ConfigTest on WindowsRobin Rosenberg2014-05-171-23/+7
| |/ |/| | | | | | | | | Trust the detection of features and just test CoreConfig. Change-Id: I37f838d270a221a75d0d3842ba2f3f90aa1d6f01
* | Merge "Command line: implement checkout -- <path>"Matthias Sohn2014-05-163-4/+45
|\ \
| * | Command line: implement checkout -- <path>Matthias Sohn2014-05-123-4/+45
| | | | | | | | | | | | Change-Id: I3d261e6541fe0fcaa210587d2aa226e153071351 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Rebase: Write an empty "quiet" file to make C Git happyKonrad Kügler2014-05-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | C git tries to read this file from the rebase state directory and complains about it not being there for rebases started by JGit. An empty 'quiet' file represents the (verbose) default. Change-Id: I1844ccbf8d35442d7a8918b57b67eb9b9efd6352 Signed-off-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de>
* | | Fix wrong Exception messagesChristian Halstrick2014-05-142-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In two places we threw an IOException and the message was built using JGitText.couldNotWriteFile. We specified 2 parameters, but this pattern expects only one parameter. In both places we tried to rename a file, that's why we wanted two parameters (src and target) for the exception text. I changed it to use JGitText.renameFileFailed which accepts two parameters and fits better. Change-Id: Ib8c2cf78f2b26ca2b97754fe91fdb20b30392415 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Merge "LsTree: quote paths in output"Robin Rosenberg2014-05-121-1/+2
|\ \ \ | |/ / |/| |
| * | LsTree: quote paths in outputDave Borowitz2014-05-071-1/+2
| | | | | | | | | | | | Change-Id: Ic78d5b41e057fcd3282e97ac73ed506666f28f88
* | | Fix javadoc errors caused by missing tags for declared exceptionsTomasz Zarna2014-05-121-0/+3
| | | | | | | | | | | | | | | Change-Id: I587aae0ad217ed092f061682ffa66c724f221096 Signed-off-by: Tomasz Zarna <tomasz.zarna@tasktop.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Handle repo copyfile in bare repositories.Yuxuan 'fishy' Wang2014-05-095-35/+145
| | | | | | | | | | | | | | | Change-Id: Ie06f0c3d1bc9b2123102efaa5542ec3c232b72cd Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
* | | Handle the revision attribute in repo manifest.Yuxuan 'fishy' Wang2014-05-093-32/+219
| | | | | | | | | | | | | | | Change-Id: I77fe073aeb13c58029551b7d6e1451a9b62dc766 Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
* | | Handle repo submodules for bare repositories.Yuxuan 'fishy' Wang2014-05-074-15/+245
|/ / | | | | | | | | Change-Id: Id028a7bc9600baf0f3e2316a1f4b99e53ccc746a Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
* / Fix manifests of source bundlesMatthias Sohn2014-05-074-8/+8
|/ | | | | | | | | | | | - don't mark them as singleton to allow coexistence of multiple versions in the same installation - add missing version qualifier to Eclipse-SourceBundle header see https://dev.eclipse.org/mhonarc/lists/cross-project-issues-dev/msg10524.html Change-Id: Ie4e028038f5a1d3e18b0be06c3d2ea82e7f9068d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Merge changes I9ba0e70f,I1f38e055,Idb55a303Dave Borowitz2014-05-064-8/+137
|\ | | | | | | | | | | | | * changes: Do not rewrite parents in RevWalkTextBuiltins RevWalk: Allow disabling parent rewriting RevWalkTextBuiltin: Add -n to limit number of commits returned
| * Do not rewrite parents in RevWalkTextBuiltinsDave Borowitz2014-05-051-4/+8
| | | | | | | | | | | | | | | | Default behavior of C git is to skip parent rewriting unless particular history simplification or --parents flags are passed. Since JGit has no such flags, JGit should not rewrite parents. Change-Id: I9ba0e70fe6d5f49f975b71eea46f93198900f37d
| * RevWalk: Allow disabling parent rewritingDave Borowitz2014-05-053-3/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, setting any TreeFilter on a RevWalk triggered parent rewriting, which in the current StartGenerator implementation ends up buffering the entire commit history in memory. Aside from causing poor performance on large histories, this does not match the default behavior of `git rev-list`, which does not rewrite parent SHAs unless asked to via --parents/--children. Add a new method setRewriteParents() to RevWalk to disable this behavior. Continue rewriting parents by default to maintain backwards compatibility. Change-Id: I1f38e05526071c75ca58095e312663de5e6f334d
| * RevWalkTextBuiltin: Add -n to limit number of commits returnedDave Borowitz2014-05-051-1/+5
| | | | | | | | | | | | Implementing the -<#> flag from C git is less trivial. Change-Id: Idb55a303304a6d4055aaf37d0b4dcf92c684e25f
* | Allow callers to use different merging strategiesLaurent Goubet2014-05-066-14/+96
| | | | | | | | | | Signed-off-by: Laurent Goubet <laurent.goubet@obeo.fr> Change-Id: I84e9d7b4b772b4ad7d3e7010aad78291d4d178fe
* | Prepare 3.4.0-SNAPSHOT buildsMatthias Sohn2014-05-0655-59/+59
|/ | | | Change-Id: I5cf20c875c3e92e12c2b22465774ba42513b9add Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v3.4.0.201405051725-m7v3.4.0.201405051725-m7Matthias Sohn2014-05-0555-59/+59
| | | | | Change-Id: I8d941d22becdf019199a1c0fe28aa5835038647d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Merge "Make the resolve merger slightly more sub-classable."Robin Rosenberg2014-05-051-29/+125
|\
| * Make the resolve merger slightly more sub-classable.Laurent Goubet2014-03-061-29/+125
| | | | | | | | | | Change-Id: I7d2a90288696ee66887cc01d8a3ec2f6f28a0339 Signed-off-by: Laurent Goubet <laurent.goubet@obeo.fr>
* | Merge "blame: Fix merges, where merge result differs only by whitespace"Shawn Pearce2014-05-042-2/+34
|\ \
| * | blame: Fix merges, where merge result differs only by whitespaceKonrad Kügler2014-05-032-2/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When blaming a merge commit with "Ignore whitespace changes" enabled, don't discard blame candidates for other parents when we encounter a parent that only has whitespace changes compared to the merge result. The algorithm early prepares parents for blaming, removing the appropriate blame regions from the list of regions still to blame. Only at the end, the prepared blame candidates are submitted for blaming. When looking at a non-first parent which only differs in whitespace to the merge result, it submitted that parent, but only to blame it for the (usually few) lines not already prepared to blame on other parents. Due to an early return the blame candidates for the previous parents were forgotten, leaving many lines unannotated. bug: 433024 Change-Id: I43c9caf2078b92b05e652dbed2192568907bf199 Signed-off-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de>
* | | Update 4.4 target to use Luna M7 orbit repositoryMatthias Sohn2014-05-041-5/+5
| | | | | | | | | | | | | | | Change-Id: I9a19d5584deef970cc00a7b58beae84d55b20ddf Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | AbstractPlotRenderer: Make private methods static where applicableKonrad Kügler2014-05-031-3/+3
| | | | | | | | | | | | Change-Id: Iaf02502b02b2420c059f04bbe09254941301c727 Signed-off-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de>
* | | PlotLane: Use identity hashCode and equalsKonrad Kügler2014-05-033-18/+0
|/ / | | | | | | | | | | | | Using the lane position and other data for equals/hashCode is not useful. Change-Id: I7af151d8a84544a77a486474c8ac71dd80090c66 Signed-off-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de>
* | Fix push to repo with non-fetched refsJean-Jacques Lafay2014-04-302-3/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When JGit uses bitmaps (which is the case after a gc), the push command doesn't go through the code where MissingObjectExceptions are caught for remote objects not found locally. Fixed by removing earlier non-locally-found remote objects. This was seen withing gerrit, see: https://code.google.com/p/gerrit/issues/detail?id=2025 Bug: 426044 Change-Id: Ieda718a0530e3680036edfa0963ab88fdd1362c0 Signed-off-by: Jean-Jacques Lafay <jeanjacques.lafay@gmail.com> Signed-off-by: Doug Kelly <dougk.ff7@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>