]> source.dussan.org Git - jgit.git/log
jgit.git
10 years agoblame: Un-break isFile check in tree walk 54/27754/2
Jonathan Nieder [Mon, 2 Jun 2014 19:03:45 +0000 (12:03 -0700)]
blame: Un-break isFile check in tree walk

Originally, blame's walk to find a scapegoat to blame for a file
walking backward from a commit used the test

treeWalk.getFileMode(0).getObjectType() != OBJ_BLOB

to throw out gitlink (submodule) entries.  Later, 52500d3264d2 (blame:
Micro optimize blob lookup in tree, 2014-04-17) changed that test to

(treeWalk.getRawMode(0) & TYPE_FILE) != TYPE_FILE

These checks are not the same, though: the older test accepts files
and symlinks, while the newer one accepts files, symlinks, and gitlink
(submodule) entries.  This is particularly broken in the submodule
case --- trying to parse the referred-to commit as a blob produces

caught an exception: GET /gerrit/+blame/master/plugins/reviewnotes HTTP/1.1
org.eclipse.jgit.errors.MissingObjectException: Missing blob 61702414c046dd6b811c9137b765f9db422f83db

Stick to just (possibly executable) files instead.  Symlinks are not
line-oriented data so blame on a symlink is not likely to be useful.

A quick grep for '& TYPE_' doesn't find any other instances of this
bug.

Change-Id: Iebcc91f1bee3c91adda51dccd6372e8302bf23fe
Signed-off-by: Jonathan Nieder <jrn@google.com>
10 years agoPrepare post 3.4.0 RC2 builds 74/27474/1
Matthias Sohn [Wed, 28 May 2014 15:40:46 +0000 (17:40 +0200)]
Prepare post 3.4.0 RC2 builds

Change-Id: Id8d784ba7b0aba7c6a00f459bf1ac54c1d36d061
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoJGit v3.4.0.201405281120-rc2 73/27473/1 v3.4.0.201405281120-rc2
Matthias Sohn [Wed, 28 May 2014 15:19:39 +0000 (17:19 +0200)]
JGit v3.4.0.201405281120-rc2

Change-Id: Ifd376f58cf867fc84d39582c49e971d998abf63d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoFix authentication type names broken by 0b5441a8 49/27249/4
Matthias Sohn [Sun, 25 May 2014 22:45:49 +0000 (00:45 +0200)]
Fix authentication type names broken by 0b5441a8

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>
10 years agoUpdate Luna target platform to Orbit release R20140525021250 57/27257/1
Matthias Sohn [Mon, 26 May 2014 07:35:11 +0000 (09:35 +0200)]
Update Luna target platform to Orbit release R20140525021250

Change-Id: Id46d74e9b11b2a7ea78d17b8bc12c3ad027723f1
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoAllow to include untracked files in stash operations. 12/26212/3
Andreas Hermann [Thu, 8 May 2014 12:04:32 +0000 (14:04 +0200)]
Allow to include untracked files in stash operations.

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>
10 years agoFix for reflog corruption caused by multiline message 09/27109/3
Andreas Hermann [Thu, 15 May 2014 11:40:58 +0000 (13:40 +0200)]
Fix for reflog corruption caused by multiline message

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>
10 years agoImprove layout of branches in the commit graph 53/25753/5
Konrad Kügler [Sun, 9 Mar 2014 12:44:41 +0000 (13:44 +0100)]
Improve layout of branches in the commit graph

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>
10 years agoPlotCommitList: Remove handling of children that have no lane yet 06/26806/3
Konrad Kügler [Sun, 18 May 2014 19:49:32 +0000 (21:49 +0200)]
PlotCommitList: Remove handling of children that have no lane yet

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>
10 years agoPlotCommitList: Refactor lane creation and position allocation 33/25633/4
Konrad Kügler [Sun, 27 Apr 2014 20:07:54 +0000 (22:07 +0200)]
PlotCommitList: Refactor lane creation and position allocation

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>
10 years agoAdd missing since tags 64/27064/1
Matthias Sohn [Wed, 21 May 2014 20:34:17 +0000 (22:34 +0200)]
Add missing since tags

Change-Id: I6090b81aa963731af369babbe71b05ac817ee3dc
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoRemove usage of IOException(Throwable) not available on Java 5 63/27063/1
Matthias Sohn [Wed, 21 May 2014 20:32:58 +0000 (22:32 +0200)]
Remove usage of IOException(Throwable) not available on Java 5

Change-Id: I386aa77fb78bed3fb38a3ce46eaeb47df95fdde3
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoPrepare post 3.4.0 RC1 builds 59/27059/1
Matthias Sohn [Wed, 21 May 2014 20:04:11 +0000 (22:04 +0200)]
Prepare post 3.4.0 RC1 builds

Change-Id: Ia8d29046439bc9134acdf7c88ab85ea49c4ddf47
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoJGit v3.4.0.201405211411-rc1 51/27051/1 v3.4.0.201405211411-rc1
Matthias Sohn [Wed, 21 May 2014 18:11:56 +0000 (20:11 +0200)]
JGit v3.4.0.201405211411-rc1

Change-Id: Ia3834770b9719f64cbdfd0338034c392fa3ae5db
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoAdd script to create JGit release 50/27050/1
Matthias Sohn [Wed, 21 May 2014 13:27:34 +0000 (15:27 +0200)]
Add script to create JGit release

Change-Id: I620a209406dd021f3e8e1dafcfb381631dfd25d2
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoAdds support for SPNEGO 89/22489/3
Laurent Goujon [Mon, 24 Feb 2014 22:47:51 +0000 (14:47 -0800)]
Adds support for SPNEGO

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>
10 years agoCreates HttpAuthMethod type enum to support auth ordering 88/22488/2
Laurent Goujon [Mon, 24 Feb 2014 21:52:33 +0000 (13:52 -0800)]
Creates HttpAuthMethod type enum to support auth ordering

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>
10 years agoDetects background authentication and force use of jgit authentication 87/22487/3
Laurent Goujon [Mon, 24 Feb 2014 21:23:00 +0000 (13:23 -0800)]
Detects background authentication and force use of jgit authentication

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>
10 years agoAdds GSSManager factory class, to be used for SPNEGO HTTP authentication 86/22486/2
Laurent Goujon [Mon, 24 Feb 2014 21:01:40 +0000 (13:01 -0800)]
Adds GSSManager factory class, to be used for SPNEGO HTTP authentication

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>
10 years agoblame: Revert common subtree elimination "optimization" 12/25612/3
Shawn Pearce [Sat, 26 Apr 2014 17:40:30 +0000 (10:40 -0700)]
blame: Revert common subtree elimination "optimization"

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

10 years agoMerge "Cherry-Pick: Support --mainline to pick merges"
Robin Rosenberg [Mon, 19 May 2014 19:43:22 +0000 (15:43 -0400)]
Merge "Cherry-Pick: Support --mainline to pick merges"

10 years agoCherry-Pick: Support --mainline to pick merges 65/26765/3
Konrad Kügler [Fri, 16 May 2014 16:42:44 +0000 (18:42 +0200)]
Cherry-Pick: Support --mainline to pick merges

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>
10 years agoFix a number of failing conflict situations 60/22160/11
Robin Rosenberg [Sun, 30 Mar 2014 20:04:53 +0000 (22:04 +0200)]
Fix a number of failing conflict situations

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>
10 years agoMerge "Archive: Add the ability to select one or more paths."
Robin Rosenberg [Sat, 17 May 2014 17:00:26 +0000 (13:00 -0400)]
Merge "Archive: Add the ability to select one or more paths."

10 years agoFix failing ConfigTest on Windows 67/24167/5
Robin Rosenberg [Sun, 30 Mar 2014 14:09:20 +0000 (16:09 +0200)]
Fix failing ConfigTest on Windows

Trust the detection of features and just test CoreConfig.

Change-Id: I37f838d270a221a75d0d3842ba2f3f90aa1d6f01

10 years agoMerge "Command line: implement checkout -- <path>"
Matthias Sohn [Fri, 16 May 2014 20:50:41 +0000 (16:50 -0400)]
Merge "Command line: implement checkout -- <path>"

10 years agoRebase: Write an empty "quiet" file to make C Git happy 99/26699/1
Konrad Kügler [Fri, 16 May 2014 07:01:23 +0000 (09:01 +0200)]
Rebase: Write an empty "quiet" file to make C Git happy

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>
10 years agoArchive: Add the ability to select one or more paths. 52/26152/8
Shaul Zorea [Wed, 7 May 2014 15:50:04 +0000 (18:50 +0300)]
Archive: Add the ability to select one or more paths.

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>
10 years agoFix wrong Exception messages 22/26422/2
Christian Halstrick [Tue, 13 May 2014 07:17:25 +0000 (09:17 +0200)]
Fix wrong Exception messages

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>
10 years agoMerge "LsTree: quote paths in output"
Robin Rosenberg [Mon, 12 May 2014 21:35:45 +0000 (17:35 -0400)]
Merge "LsTree: quote paths in output"

10 years agoCommand line: implement checkout -- <path> 86/23086/3
Matthias Sohn [Mon, 10 Feb 2014 07:10:31 +0000 (08:10 +0100)]
Command line: implement checkout -- <path>

Change-Id: I3d261e6541fe0fcaa210587d2aa226e153071351
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoFix javadoc errors caused by missing tags for declared exceptions 41/26341/2
Tomasz Zarna [Sun, 11 May 2014 19:14:30 +0000 (21:14 +0200)]
Fix javadoc errors caused by missing tags for declared exceptions

Change-Id: I587aae0ad217ed092f061682ffa66c724f221096
Signed-off-by: Tomasz Zarna <tomasz.zarna@tasktop.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoHandle repo copyfile in bare repositories. 95/26195/5
Yuxuan 'fishy' Wang [Thu, 8 May 2014 00:14:01 +0000 (17:14 -0700)]
Handle repo copyfile in bare repositories.

Change-Id: Ie06f0c3d1bc9b2123102efaa5542ec3c232b72cd
Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
10 years agoHandle the revision attribute in repo manifest. 76/26076/6
Yuxuan 'fishy' Wang [Fri, 2 May 2014 18:15:34 +0000 (11:15 -0700)]
Handle the revision attribute in repo manifest.

Change-Id: I77fe073aeb13c58029551b7d6e1451a9b62dc766
Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
10 years agoLsTree: quote paths in output 69/26169/1
Dave Borowitz [Fri, 2 May 2014 22:48:59 +0000 (15:48 -0700)]
LsTree: quote paths in output

Change-Id: Ic78d5b41e057fcd3282e97ac73ed506666f28f88

10 years agoHandle repo submodules for bare repositories. 74/26074/3
Yuxuan 'fishy' Wang [Thu, 1 May 2014 18:50:00 +0000 (11:50 -0700)]
Handle repo submodules for bare repositories.

Change-Id: Id028a7bc9600baf0f3e2316a1f4b99e53ccc746a
Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
10 years agoFix manifests of source bundles 12/26112/1
Matthias Sohn [Wed, 7 May 2014 06:50:33 +0000 (08:50 +0200)]
Fix manifests of source bundles

- 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>
10 years agoMerge changes I9ba0e70f,I1f38e055,Idb55a303
Dave Borowitz [Tue, 6 May 2014 18:05:14 +0000 (14:05 -0400)]
Merge changes I9ba0e70f,I1f38e055,Idb55a303

* changes:
  Do not rewrite parents in RevWalkTextBuiltins
  RevWalk: Allow disabling parent rewriting
  RevWalkTextBuiltin: Add -n to limit number of commits returned

10 years agoAllow callers to use different merging strategies 59/22559/4
Laurent Goubet [Tue, 21 Jan 2014 15:35:26 +0000 (16:35 +0100)]
Allow callers to use different merging strategies

Signed-off-by: Laurent Goubet <laurent.goubet@obeo.fr>
Change-Id: I84e9d7b4b772b4ad7d3e7010aad78291d4d178fe

10 years agoDo not rewrite parents in RevWalkTextBuiltins 00/26000/3
Dave Borowitz [Mon, 5 May 2014 22:21:16 +0000 (15:21 -0700)]
Do not rewrite parents in RevWalkTextBuiltins

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

10 years agoRevWalk: Allow disabling parent rewriting 99/25999/3
Dave Borowitz [Mon, 5 May 2014 22:15:13 +0000 (15:15 -0700)]
RevWalk: Allow disabling parent rewriting

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

10 years agoRevWalkTextBuiltin: Add -n to limit number of commits returned 98/25998/2
Dave Borowitz [Mon, 5 May 2014 19:42:23 +0000 (12:42 -0700)]
RevWalkTextBuiltin: Add -n to limit number of commits returned

Implementing the -<#> flag from C git is less trivial.

Change-Id: Idb55a303304a6d4055aaf37d0b4dcf92c684e25f

10 years agoPrepare 3.4.0-SNAPSHOT builds 97/25997/1
Matthias Sohn [Mon, 5 May 2014 22:03:31 +0000 (00:03 +0200)]
Prepare 3.4.0-SNAPSHOT builds

Change-Id: I5cf20c875c3e92e12c2b22465774ba42513b9add
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoJGit v3.4.0.201405051725-m7 96/25996/1 v3.4.0.201405051725-m7
Matthias Sohn [Mon, 5 May 2014 21:33:03 +0000 (23:33 +0200)]
JGit v3.4.0.201405051725-m7

Change-Id: I8d941d22becdf019199a1c0fe28aa5835038647d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoMerge "Make the resolve merger slightly more sub-classable."
Robin Rosenberg [Mon, 5 May 2014 19:09:03 +0000 (15:09 -0400)]
Merge "Make the resolve merger slightly more sub-classable."

10 years agoMerge "blame: Fix merges, where merge result differs only by whitespace"
Shawn Pearce [Sun, 4 May 2014 18:37:14 +0000 (14:37 -0400)]
Merge "blame: Fix merges, where merge result differs only by whitespace"

10 years agoUpdate 4.4 target to use Luna M7 orbit repository 20/25920/1
Matthias Sohn [Sat, 3 May 2014 23:51:38 +0000 (01:51 +0200)]
Update 4.4 target to use Luna M7 orbit repository

Change-Id: I9a19d5584deef970cc00a7b58beae84d55b20ddf
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoAbstractPlotRenderer: Make private methods static where applicable 29/25629/2
Konrad Kügler [Sun, 27 Apr 2014 19:46:59 +0000 (21:46 +0200)]
AbstractPlotRenderer: Make private methods static where applicable

Change-Id: Iaf02502b02b2420c059f04bbe09254941301c727
Signed-off-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de>
10 years agoPlotLane: Use identity hashCode and equals 27/25627/3
Konrad Kügler [Sun, 27 Apr 2014 18:35:14 +0000 (20:35 +0200)]
PlotLane: Use identity hashCode and equals

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>
10 years agoblame: Fix merges, where merge result differs only by whitespace 05/25905/3
Konrad Kügler [Sat, 3 May 2014 13:00:47 +0000 (15:00 +0200)]
blame: Fix merges, where merge result differs only by whitespace

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>
10 years agoFix push to repo with non-fetched refs 94/21094/6
Jean-Jacques Lafay [Fri, 25 Apr 2014 21:13:25 +0000 (16:13 -0500)]
Fix push to repo with non-fetched refs

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>
10 years agoMake org.eclipse.jgit.packaging a general project 33/13833/3
Robin Rosenberg [Fri, 14 Jun 2013 22:57:50 +0000 (00:57 +0200)]
Make org.eclipse.jgit.packaging a general project

This makes it easy to edit the pom.xml from within Eclipse.

Change-Id: I4718217caadbfe892b7cbb557e0d3d6b40d48321
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoMerge changes I2515a6ed,Ib6b24035
Matthias Sohn [Sun, 27 Apr 2014 13:34:02 +0000 (09:34 -0400)]
Merge changes I2515a6ed,Ib6b24035

* changes:
  Fix ArrayIndexOutOfBoundsException in CreateBranchCommand
  Add methods to Repository to handle remote names

10 years agoFix ArrayIndexOutOfBoundsException in CreateBranchCommand 04/25604/4
Robin Rosenberg [Sat, 26 Apr 2014 11:05:53 +0000 (13:05 +0200)]
Fix ArrayIndexOutOfBoundsException in CreateBranchCommand

If remote name contains / or there was a branch directly under the
refs/remotes namespace (wrong) the computation of remote name and
suggested local branch name would fail. Fix this by looking at the
configured remotes. A ref under refs/remotes that does not match a
remote configuration is not considered a remote tracking branch anymore.

This patch does not fix all similar errors in EGit/JGit.

Bug: 411002
Bug: 400414
Change-Id: I2515a6ed05f9104c387ce4e43b24dae942ae2473

10 years agoAdd methods to Repository to handle remote names 03/25603/3
Robin Rosenberg [Sat, 26 Apr 2014 08:55:42 +0000 (10:55 +0200)]
Add methods to Repository to handle remote names

Instead of requiring the caller to know how to list remote
names or parse remote branch names, add a few utilities for
that.

Change-Id: Ib6b2403532f4abbce594a03c0b9da49d30b19f70
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
10 years agoFix BlameResult.computeRange JavaDoc to exclude end index 06/25606/1
Konrad Kügler [Sat, 26 Apr 2014 12:29:55 +0000 (14:29 +0200)]
Fix BlameResult.computeRange JavaDoc to exclude end index

Change-Id: Ifd7dd86e3848eb7a522ba5c49d5c216777484f3b
Signed-off-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de>
10 years agoAdd API to permit the setting of additional HTTP headers 09/23409/5
Bogdan Gheorghe [Fri, 14 Mar 2014 20:00:25 +0000 (16:00 -0400)]
Add API to permit the setting of additional HTTP headers

Signed-off-by: Bogdan Gheorghe <gheorghe@ca.ibm.com>
Change-Id: I1047f318bb5c63850f45ba85d73c97fe8bf70a6c

10 years agocleanup: remove some unused imports 92/25592/2
Robin Rosenberg [Fri, 25 Apr 2014 20:27:35 +0000 (22:27 +0200)]
cleanup: remove some unused imports

Change-Id: I549b934b86753acc362364c8986bfe6457affd12

10 years agoMaking ArchiveFormats breaks the API, but that's ok 91/25591/2
Robin Rosenberg [Fri, 25 Apr 2014 20:27:16 +0000 (22:27 +0200)]
Making ArchiveFormats breaks the API, but that's ok

Add compatibility filters to hide the breakage.

Change-Id: Icc1fdc29f15d734d488e49c9c37a18f5ac937903

10 years agoAdd jacoco instrumentation for code coverage reports 10/10610/9
Matthias Sohn [Mon, 25 Feb 2013 00:10:40 +0000 (01:10 +0100)]
Add jacoco instrumentation for code coverage reports

See http://mickaelistria.wordpress.com/2012/10/08/sonar-at-eclipse-org/

Change-Id: Idd7df8125e0792e9bba924eadbc1320230cfa624
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoMerge changes Ia4df9808,I83e8a321,Id0e7663b,Ib809b00c,I88a6ee07
Shawn Pearce [Fri, 25 Apr 2014 18:01:06 +0000 (14:01 -0400)]
Merge changes Ia4df9808,I83e8a321,Id0e7663b,Ib809b00c,I88a6ee07

* changes:
  Commit changes generated during repo command
  Added implementation of copyfile rule.
  Added groups support to repo subcommand.
  Added the command line of jgit repo.
  Implemented first part of the repo sub-command.

10 years agoCommit changes generated during repo command 85/25285/5
Yuxuan 'fishy' Wang [Fri, 18 Apr 2014 15:23:20 +0000 (08:23 -0700)]
Commit changes generated during repo command

Change-Id: Ia4df9808294d2069dcc5973bcb69b4499c7dcacd
Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
10 years agoMerge "Automatically reload known_hosts file"
Shawn Pearce [Fri, 25 Apr 2014 16:34:37 +0000 (12:34 -0400)]
Merge "Automatically reload known_hosts file"

10 years agoAutomatically reload known_hosts file 23/25523/2
Doug Kelly [Thu, 24 Apr 2014 19:37:27 +0000 (14:37 -0500)]
Automatically reload known_hosts file

JGit caches the contents of the known_hosts file within JSch when
first started, and never attempts to re-read it.  If the contents
change (such as when using Gerrit replication), the new host will
never be found.

On failures, try reloading the knonwn_hosts and retry the
connection, in addition to reloading the credentials.

Change-Id: I980c4f4003f2a48c71b9b47c51e640d1e7742f58
Signed-off-by: Doug Kelly <dougk.ff7@gmail.com>
10 years agoRemove streaming delta support from JGit 49/25449/4
Doug Kelly [Thu, 24 Apr 2014 00:33:18 +0000 (19:33 -0500)]
Remove streaming delta support from JGit

Streaming packed deltas is so slow that it never feasibly completes
(it will take hours for it to stream a few hundred megabytes on
relatively fast systems with a large amount of storage).  This
was indicated as a "failed experiment" by Shawn in the following
mailing list post:
http://dev.eclipse.org/mhonarc/lists/jgit-dev/msg01674.html

Change-Id: Idc12f59e37b122f13856d7b533a5af9d8867a8a5
Signed-off-by: Doug Kelly <dougk.ff7@gmail.com>
10 years agoAdded implementation of copyfile rule. 81/24681/8
Yuxuan 'fishy' Wang [Tue, 25 Mar 2014 22:30:54 +0000 (15:30 -0700)]
Added implementation of copyfile rule.

Change-Id: I83e8a3218be2984321342039fda507fdb1aa5f30
Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
10 years agoAdded groups support to repo subcommand. 80/24680/6
Yuxuan 'fishy' Wang [Mon, 24 Mar 2014 19:40:04 +0000 (12:40 -0700)]
Added groups support to repo subcommand.

Change-Id: Id0e7663b6ac4f6938fdcacaf2158107b6285fc25
Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
10 years agoAdded the command line of jgit repo. 79/24679/6
Yuxuan 'fishy' Wang [Mon, 24 Mar 2014 19:39:41 +0000 (12:39 -0700)]
Added the command line of jgit repo.

Change-Id: Ib809b00c236a9c44422a872ae801b060f5b26808
Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
10 years agoImplemented first part of the repo sub-command. 78/24678/6
Yuxuan 'fishy' Wang [Mon, 24 Mar 2014 19:39:09 +0000 (12:39 -0700)]
Implemented first part of the repo sub-command.

Currently the repo sub-command only "works", but the submodules will have .git
directories themselves, and lacks group support.

Change-Id: I88a6ee07109187c6c9bfd92a044775fcfb5befa6
Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
10 years agoMerge "blame: Format commit and author only once per range"
Shawn Pearce [Wed, 23 Apr 2014 20:33:16 +0000 (16:33 -0400)]
Merge "blame: Format commit and author only once per range"

10 years agoMerge changes Icb1d49e5,I8bcab447,I3fa19b86,I2cda031b,I8b2dbf63
Shawn Pearce [Tue, 22 Apr 2014 19:59:07 +0000 (15:59 -0400)]
Merge changes Icb1d49e5,I8bcab447,I3fa19b86,I2cda031b,I8b2dbf63

* changes:
  blame: Reuse existing blameEntireRegionOnParent method
  blame: Remove unnecessary curly braces around single statement if
  blame: Allow candidate to manage its setup before output
  blame: Do not update candidate regionList during output
  blame: Only use computeRange if -L was requested

10 years agoblame: Format commit and author only once per range 09/25309/2
Shawn Pearce [Sun, 20 Apr 2014 01:34:21 +0000 (18:34 -0700)]
blame: Format commit and author only once per range

When a commit is blamed for multiple lines of the result file the
command line interface prints the same text before each line in that
span.  Format these strings once and reuse them as the line prefix.

For long files (e.g. 2425 lines of ReceiveCommits.java in Gerrit)
this can save as much as 20ms during the output phase of the command
line blame program.

Change-Id: Ie42787d77c8d0cbca7ccbf59c795120494a2a891

10 years agoblame: Reuse existing blameEntireRegionOnParent method 14/25314/2
Shawn Pearce [Sun, 20 Apr 2014 22:55:32 +0000 (15:55 -0700)]
blame: Reuse existing blameEntireRegionOnParent method

Skipping directly to the parent is already possible with an existing
helper method. Update the source path (to follow the rename) and then
use the existing code path to push the parent inside the current entry.

Change-Id: Icb1d49e53d14b599efc478990613625a9e058e09

10 years agoblame: Remove unnecessary curly braces around single statement if 13/25313/2
Shawn Pearce [Sun, 20 Apr 2014 22:54:10 +0000 (15:54 -0700)]
blame: Remove unnecessary curly braces around single statement if

Change-Id: I8bcab44785fe08bbf3519c634e57ebfea8d3f0f9

10 years agoblame: Allow candidate to manage its setup before output 11/25311/2
Shawn Pearce [Sun, 20 Apr 2014 03:02:19 +0000 (20:02 -0700)]
blame: Allow candidate to manage its setup before output

Pass in the RevWalk and let the candidate decide how to prepare itself
for output. This removes the conditional for the missing sourceCommit,
as candidates missing a commit can override the method with a no-op.

Change-Id: I3fa19b8676dfd3c177583f8f42593b5000b5350d

10 years agoblame: Do not update candidate regionList during output 10/25310/2
Shawn Pearce [Sun, 20 Apr 2014 02:59:21 +0000 (19:59 -0700)]
blame: Do not update candidate regionList during output

Instead of updating the candidate's regionList field to iterate
through the linked list of regions, use a special purpose field
in the BlameGenerator. This allows the candidate to be unmodified.

Change-Id: I2cda031b59220ab603ef82050e741ecbbaa1953f

10 years agoblame: Only use computeRange if -L was requested 08/25308/2
Shawn Pearce [Sun, 20 Apr 2014 01:24:43 +0000 (18:24 -0700)]
blame: Only use computeRange if -L was requested

The computeRange method is inefficient for computing the entire file.
If the entire file was selected ask for the entire file.

Change-Id: I8b2dbf635e875cc125443dac50be121208646540

10 years agopgm: Flush stderr during shutdown 07/25307/2
Shawn Pearce [Sun, 20 Apr 2014 01:02:48 +0000 (18:02 -0700)]
pgm: Flush stderr during shutdown

If an error occurs in command line option parsing the error message
may be stuck in a Java level buffer.  Flush the stream to ensure
everything is made available to the calling process or terminal.

Change-Id: I55b16e43aa96fc81c1197121032f5cdd901d412c

10 years agoExpose ReceiveCommand version of TrackingRefUpdate 93/25293/1
Shawn Pearce [Fri, 18 Apr 2014 21:03:20 +0000 (14:03 -0700)]
Expose ReceiveCommand version of TrackingRefUpdate

If the caller uses a BatchRefUpdate to execute these (e.g. fetch)
there may be more detailed status information inside of the command
that was used to execute it. Allow the caller to obtain that status
data from the ReceiveCommand version of the TrackingRefUpdate.

Change-Id: I47209377fb8fcef0346d7678f1ab27f4790b49bc

10 years agoMerge changes I483c40e8,Ib16d684d,I9fb25229,I5f7c4855,I36905959
Shawn Pearce [Fri, 18 Apr 2014 19:23:07 +0000 (15:23 -0400)]
Merge changes I483c40e8,Ib16d684d,I9fb25229,I5f7c4855,I36905959

* changes:
  diff: Optimize single line edits
  blame: Reduce running time ~4.5% by skipping common subtrees
  blame: Micro optimize blob lookup in tree
  blame: Automatically increase commit abbreviation length
  Blame correctly in the presence of conflicting merges

10 years agodiff: Optimize single line edits 86/25286/4
Shawn Pearce [Fri, 18 Apr 2014 16:05:05 +0000 (09:05 -0700)]
diff: Optimize single line edits

If the header and trailer are identical up to a single line on both
sides, return that REPLACE edit as the only result.  No algorithm can
break down a REPLACE with height of 1.

Change-Id: I483c40e8790cc3e8b322ef6dfce2299491fd0ac7

10 years agoMerge branch 'stable-3.3' 69/25269/1
Matthias Sohn [Fri, 18 Apr 2014 12:53:40 +0000 (14:53 +0200)]
Merge branch 'stable-3.3'

* stable-3.3:
  JGit v3.3.2.201404171909-r
  Fix version.sh to update Eclipse-SourceBundle version

Change-Id: Ic4f5d5c73f18775ca4449bb79d46e3b807a46ab2
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoJGit v3.3.2.201404171909-r 45/25245/2 stable-3.3 v3.3.2.201404171909-r
Matthias Sohn [Thu, 17 Apr 2014 23:44:26 +0000 (01:44 +0200)]
JGit v3.3.2.201404171909-r

Change-Id: I1d7e40156d0b6e30bd5f3a40f18c836b7d1ba78f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoFix version.sh to update Eclipse-SourceBundle version 46/25246/1
Matthias Sohn [Thu, 17 Apr 2014 23:11:49 +0000 (01:11 +0200)]
Fix version.sh to update Eclipse-SourceBundle version

The version attribute of Eclipse-SourceBundle must match
the bundle version.

Change-Id: Ic629ccae1d89c9070e4ec80420a0e2ed7d403922
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoblame: Reduce running time ~4.5% by skipping common subtrees 44/25244/2
Shawn Pearce [Thu, 17 Apr 2014 22:26:04 +0000 (15:26 -0700)]
blame: Reduce running time ~4.5% by skipping common subtrees

With this commit running blame on render_view_impl.cc[1] saves
about 644 ms over prior versions, reducing the time about 4.5%.

Large projects often contain strands of commits where no changes
are made to a particular subtree. Blame used to dive recursively
into these subtrees to look for the blob and check if its SHA-1
was changed. In chromium/src[1] only 20% of the commits modify
the content/renderer subtree relevant for the file.

The recursivePath is necessary to check for '/' and remember
if common subtree elimination should be attempted. When a file
lives within a subtree the extra cost to check for unmodified
subtrees saves time. However for files in the root tree the
extra work incurred by TreeWalk is not worthwhile and would
significantly increase overall running time.

Now typical running times from an otherwise idle desktop:

  real 0m13.387s  0m13.341s  0m13.443s
  user 0m15.410s  0m15.220s  0m15.350s

previously:

  real 0m14.085s  0m14.049s  0m13.968s
  user 0m15.730s  0m15.820s  0m15.770s

[1] https://chromium.googlesource.com/chromium/src/+show/34d6e5c5b4248b1b199405af7ad00f961921f347/content/renderer/render_view_impl.cc

Change-Id: Ib16d684df7ffa034ee28def3fb22c797998d5b7b

10 years agoblame: Micro optimize blob lookup in tree 43/25243/2
Shawn Pearce [Thu, 17 Apr 2014 22:03:18 +0000 (15:03 -0700)]
blame: Micro optimize blob lookup in tree

Avoid converting the raw mode to FileMode. This is an expensive
if-else-if sort of test to just check if the thing is a blob.
Instead test the bit mask directly, which is at least a few
instructions shorter.

The TreeWalk is already recursive and will auto-dive into any
subtrees found. isSubtree check is unnecessary, as is the loop,
as only one result will ever be returned by next().

Change-Id: I9fb25229ebed857469427bfbdf74aedebfddfac8

10 years agoblame: Automatically increase commit abbreviation length 39/25239/3
Shawn Pearce [Thu, 17 Apr 2014 21:19:23 +0000 (14:19 -0700)]
blame: Automatically increase commit abbreviation length

Ensure commit object names are unique by extending the default
abbreviation as long as necessary. This allows `jgit blame` to
more closely match the formatted output of `git blame` on large
histories like Gerrit Code Review's ReceiveCommits.java file.

Change-Id: I5f7c4855769ee9dcba973389df9e109005dcdb5b

10 years agoBlame correctly in the presence of conflicting merges 16/24916/6
Konrad Kügler [Sun, 13 Apr 2014 17:21:06 +0000 (19:21 +0200)]
Blame correctly in the presence of conflicting merges

Problem:
The BlameGenerator used the RevFlag SEEN to mark commits it had
already looked at (but not necessarily processed), to prevent
processing a commit multiple times. If a commit is a conflicting
merge that contains lines of the merge base, that have been deleted
in its first parent, either these lines or the lines untouched
since the merge base would not be blamed properly.

This happens for example if a file is modified on a main branch in an
earlier commit M and on a side branch in a later commit S. For this
example, M deletes some lines relative to the common base commit B,
and S modifies a subset of these lines, leaving some other of these
lines untouched.

Then side is merged into main, creating a conflict for these
lines. The merge resolution shall carry over some unmodified lines
from B that would otherwise be deleted by M. The route to blame
these lines is via S to B. They can't be blamed via M, as they
don't exist there anymore.

    Q
    |\
    | \
    | S
    | |
    M |
    | /
    |/
    B

Blaming the merged file first blames via S, because that is the
most recent commit. Doing so, it also looks at B to blame the
unmodified lines of B carried over by S into the merge result. In the
course of this, B is submitted for later processing and marked SEEN.

Later M is blamed. It notices that its parent commit B has been
SEEN and aborts processing for M. B is blamed after that, but only
for the lines that survived via S.

As a result, only the lines contributed by S or by B via S are
blamed. All the other lines that were unchanges by both M and S,
which should have been blamed to B via M, are not blamed.

Solution:
Don't abort processing when encountering a SEEN commit. Rather add the
new region list of lines to be blamed to those of the already SEEN and
enqueued commit's region list. This way when the B commit of the
above example is processed, it will blame both the lines of M and S,
yielding a complete blame result.

Bug: 374382
Change-Id: I369059597608022948009ea7708cc8190f05a8d3
Signed-off-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de>
Signed-off-by: Shawn Pearce <spearce@spearce.org>
10 years agoAllow ArchiveCommand.registerFormat to be called twice 87/24887/5
Jonathan Nieder [Wed, 16 Apr 2014 18:52:02 +0000 (11:52 -0700)]
Allow ArchiveCommand.registerFormat to be called twice

This should make it possible for the gitiles plugin to register its
archive formats after gerrit has already registered them.

Signed-off-by: Jonathan Nieder <jrn@google.com>
Change-Id: Icb80a446e583961a7278b707d572d6fe456c372c

10 years agoMerge "Make ArchiveFormats final and implement equals()"
Dave Borowitz [Mon, 14 Apr 2014 20:41:44 +0000 (16:41 -0400)]
Merge "Make ArchiveFormats final and implement equals()"

10 years agoMerge branch 'stable-3.3' 24/24924/1
Matthias Sohn [Sun, 13 Apr 2014 23:20:01 +0000 (01:20 +0200)]
Merge branch 'stable-3.3'

* stable-3.3:
  Ensure that stored credentials aren't reset too early

Change-Id: Idcd57e12f5fe905952be49edb4f82db6b7ed469f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoUpdate Software User Agreement 21/24921/2
Matthias Sohn [Sun, 13 Apr 2014 21:27:45 +0000 (23:27 +0200)]
Update Software User Agreement

Bug: 431255
Change-Id: I8a44028d8c48ddd1b9d2f9ef4af4d417c5454881

10 years agoEnsure that stored credentials aren't reset too early 23/24923/1
Matthias Sohn [Wed, 26 Mar 2014 22:16:36 +0000 (23:16 +0100)]
Ensure that stored credentials aren't reset too early

Some commands are started without showing a dialog allowing to enter
credentials if needed. Hence we need to tolerate one failing HTTP
authentication to trigger loading credentials from the secure store.
Hence we should not immediately reset the stored credentials if the
first attempt to authenticate fails.

Bug: 431209
Change-Id: I1b9fa34c3d70be226bb1c59c9ebe995998d29bc8
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoMake ArchiveFormats final and implement equals() 86/24886/1
Jonathan Nieder [Fri, 11 Apr 2014 21:01:56 +0000 (14:01 -0700)]
Make ArchiveFormats final and implement equals()

This should make it easier to modify ArchiveCommand to allow an
archive format to be registered twice while still noticing if
different callers try to register different implementations for
the same format.

Change-Id: I32261bc8dc1877a853b49e0da0a6e78921791812
Signed-off-by: Jonathan Nieder <jrn@google.com>
10 years agoMerge changes Id9a641dd,If2ee1f42
Robin Rosenberg [Wed, 9 Apr 2014 20:14:28 +0000 (16:14 -0400)]
Merge changes Id9a641dd,If2ee1f42

* changes:
  Added TestCase for 7d5e1f Fixed RevWalk.isMergedInto()
  Fixed RevWalk.isMergedInto() returning wrong results

10 years agoAdded TestCase for 7d5e1f Fixed RevWalk.isMergedInto() 49/24549/2
Sven Selberg [Mon, 24 Mar 2014 17:05:32 +0000 (18:05 +0100)]
Added TestCase for 7d5e1f Fixed RevWalk.isMergedInto()

Change-Id: Id9a641dd67c4182bb3a0dc83a6864fee43e7653f
Signed-off-by: Gustaf Lundh <gustaf.lundh@sonymobile.com>
Signed-off-by: Sven Selberg <sven.selberg@sonymobile.com>
10 years agoFix ValidRefNameTest on Windows 00/24000/3
Robin Rosenberg [Sun, 30 Mar 2014 09:00:36 +0000 (11:00 +0200)]
Fix ValidRefNameTest on Windows

There are certain ref names which native git can be create only on
non-windows systems (e.g. "refs/tags/>"). On Windows systems we can't
persist this refs because the ref names are not valid file names. Our
tests in ValidRefNameTest assumed that these are valid refs on all
systems. This broke the tests on Windows.

Change-Id: Ic53c396c88b84cbdf579a636953f7519952270c0

10 years agoFix FileTreeIteratorTest#testIsModifiedFileSmudged() on Windows 60/24160/2
Robin Rosenberg [Sat, 29 Mar 2014 20:59:26 +0000 (21:59 +0100)]
Fix FileTreeIteratorTest#testIsModifiedFileSmudged() on Windows

This would be a problem for any OS where Java lets the subscond
part through to the File API. The fix is to force the timetamp
of the index rather than trusting it to just happen to be right.

Bug: 430765
Change-Id: Id6b3ba003f58427a3ffaacd224649e2d6c93566b
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
10 years agoDon't use package private classes when overriding a public interface 15/24415/3
Robin Rosenberg [Fri, 4 Apr 2014 05:30:15 +0000 (07:30 +0200)]
Don't use package private classes when overriding a public interface

Change-Id: If8522d4e02254766e3310a70e42badafa5ab9768
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
10 years agoMark getParent deprecated in CanonicalTreeParser 11/24411/1
Shawn Pearce [Thu, 3 Apr 2014 19:08:07 +0000 (12:08 -0700)]
Mark getParent deprecated in CanonicalTreeParser

@deprecated in Javadoc must be accompanied by @Deprecated annotation
on the class member.

Change-Id: Ifdf787f496ff3ffd6ffe8f3321d56320cb08454f