]> source.dussan.org Git - jgit.git/log
jgit.git
10 years agoEnable passing version number to maven central scripts 85/28085/3
Matthias Sohn [Thu, 5 Jun 2014 23:24:03 +0000 (01:24 +0200)]
Enable passing version number to maven central scripts

Also check if the passed version matches the version pattern
<major>.<minor>.<micro>.<qualifier>-<classifier>

Change-Id: Ib7edf51fb5e89232909611de5b4811a62b4f3953
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoMerge "Fix DeltaTask infinite loop"
Robin Rosenberg [Fri, 6 Jun 2014 11:40:37 +0000 (07:40 -0400)]
Merge "Fix DeltaTask infinite loop"

10 years agoMerge "Make JavaDoc validator happy by declaring GitAPIException on callAsMap"
Robin Rosenberg [Fri, 6 Jun 2014 11:11:10 +0000 (07:11 -0400)]
Merge "Make JavaDoc validator happy by declaring GitAPIException on callAsMap"

10 years agoFix DeltaTask infinite loop 71/28071/1
Hugo Arès [Thu, 5 Jun 2014 19:16:26 +0000 (15:16 -0400)]
Fix DeltaTask infinite loop

DeltaTask$Block.partitionTask was doing an infinite loop if number of
threads was greater than the totalWeight. The weightPerThread was 0
which was causing the infinite loop. Set the weightPerThread to a
minimal value of one.

Bug: 420915
Change-Id: Ia8e3ad956d53d8193937b7fa1bc19aafde9767ff
Signed-off-by: Hugo Arès <hugo.ares@ericsson.com>
10 years agoPrepare 3.5.0-SNAPSHOT builds 07/27907/4
Robin Rosenberg [Wed, 4 Jun 2014 08:32:22 +0000 (10:32 +0200)]
Prepare 3.5.0-SNAPSHOT builds

Change-Id: I53bd500188e09ae2e007a58b3cd89aa0805d6f2a
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
10 years agoMerge branch 'stable-3.4' 00/28000/1
Matthias Sohn [Wed, 4 Jun 2014 21:28:49 +0000 (23:28 +0200)]
Merge branch 'stable-3.4'

* stable-3.4:
  Prepare post 3.4 RC3 builds
  JGit v3.4.0.201406041058-rc3
  blame: Un-break isFile check in tree walk
  Prepare post 3.4.0 RC2 builds
  JGit v3.4.0.201405281120-rc2
  Fix authentication type names broken by 0b5441a8
  Update Luna target platform to Orbit release R20140525021250

Change-Id: I344f1bbb8939bda01d524ec1a3218aa32bcc62f5
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoPrepare post 3.4 RC3 builds 94/27994/1
Matthias Sohn [Wed, 4 Jun 2014 20:14:26 +0000 (22:14 +0200)]
Prepare post 3.4 RC3 builds

Change-Id: I9730bb349d0295c811aa3a9ba0f67bd946e86d1e
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoJGit v3.4.0.201406041058-rc3 55/27955/1 v3.4.0.201406041058-rc3
Matthias Sohn [Wed, 4 Jun 2014 14:58:04 +0000 (16:58 +0200)]
JGit v3.4.0.201406041058-rc3

Change-Id: If0cfec023788cae7713dd1ccc250e221365ef984
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
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 agoMake JavaDoc validator happy by declaring GitAPIException on callAsMap 94/27594/2
Robin Rosenberg [Fri, 30 May 2014 14:14:28 +0000 (16:14 +0200)]
Make JavaDoc validator happy by declaring GitAPIException on callAsMap

Change-Id: I9caa559a3d4eb0ec93d90cf1e18aed785ef85a84

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 agoRemove unused import 40/27340/2
Dani Megert [Tue, 27 May 2014 09:58:42 +0000 (11:58 +0200)]
Remove unused import

Change-Id: I6f59539350ab28605e2e1fe1f30354cd68aa7740
Signed-off-by: Dani Megert <Daniel_Megert@ch.ibm.com>
10 years agoMerge "Unit test for the updating behavior in RepoCommand API."
Shawn Pearce [Tue, 27 May 2014 21:02:02 +0000 (17:02 -0400)]
Merge "Unit test for the updating behavior in RepoCommand API."

10 years agoUnit test for the updating behavior in RepoCommand API. 49/27049/4
Yuxuan 'fishy' Wang [Wed, 21 May 2014 18:16:36 +0000 (11:16 -0700)]
Unit test for the updating behavior in RepoCommand API.

When update the manifest against a bare repository, RepoCommand will replace
every existing content from the repository with contents populated from the
manifest. Added note for that and a unit test to make sure this behavior.

Change-Id: I1d5960e84bca5aa2a4e86f424d2ddd4197894cdc
Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.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 agoRemove a bit of repetition and casting in PackFileTest 23/27323/1
Roberto Tyley [Sun, 25 May 2014 18:34:24 +0000 (19:34 +0100)]
Remove a bit of repetition and casting in PackFileTest

PackFileTest lives in o.e.j.internal.storage.file, so I think it's OK for
it to acknowledge the existence of FileRepository in order to avoid some
unnecessary casting, and probably nicer to avoid the repetition too.

Change-Id: I0de592a32f6178e6d6bf114848101e185b3111a1
Signed-off-by: Roberto Tyley <roberto.tyley@gmail.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 agoMerge "Adds a callAsMap() function to LsRemoteCommand."
Matthias Sohn [Sat, 24 May 2014 22:06:13 +0000 (18:06 -0400)]
Merge "Adds a callAsMap() function to LsRemoteCommand."

10 years agoAdds a callAsMap() function to LsRemoteCommand. 43/27143/4
Yuxuan 'fishy' Wang [Thu, 22 May 2014 21:04:16 +0000 (14:04 -0700)]
Adds a callAsMap() function to LsRemoteCommand.

The call() function of LsRemoteCommand returns Collection<Ref>, while its
internal is using Map<String, Ref> all the time. Sometimes the map is much more
useful to the caller so add a callAsMap() function to keep the API
compatibility.

Change-Id: Icb96b71277d5e2de59872aa777352dedc048c4e3
Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
10 years agoMerge "Fix reading past FileTreeIterator EOF in FileTreeIteratorJava7Test"
Robin Rosenberg [Sat, 24 May 2014 10:10:33 +0000 (06:10 -0400)]
Merge "Fix reading past FileTreeIterator EOF in FileTreeIteratorJava7Test"

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 agoFix reading past FileTreeIterator EOF in FileTreeIteratorJava7Test 92/26992/1
Roberto Tyley [Wed, 21 May 2014 11:36:52 +0000 (12:36 +0100)]
Fix reading past FileTreeIterator EOF in FileTreeIteratorJava7Test

Stepping past the '.git' entry with `fti.next(1)` is unnecessary and in
fact a bug, as the subsequent access to FileTreeIterator is past it's
end-of-file - it has only 1 valid entry ('link').

This bug is only visibly exposed in certain environments depending on the
(unguaranteed) return order of `java.io.File.listFiles()`. On my box
FileTreeIteratorJava7Test would fail consistently for these 3 tests:

* testSymlinkActuallyModified
* testSymlinkNotModifiedThoughNormalized
* testSymlinkModifiedNotNormalized

They all failed in the same way:

testSymlinkActuallyModified(org.eclipse.jgit.treewalk.FileTreeIteratorJava7Test)  Time elapsed: 0.063 sec  <<< ERROR!
org.eclipse.jgit.api.errors.JGitInternalException: /home/roberto/development/jgit/org.eclipse.jgit.java7.test/target/jgit_test_9202429389985749040_tmp
/tmp_807992722429349842/.git (Is a directory)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:146)
        at org.eclipse.jgit.treewalk.FileTreeIterator$FileEntry.openInputStream(FileTreeIterator.java:210)
        at org.eclipse.jgit.treewalk.WorkingTreeIterator.readContentAsNormalizedString(WorkingTreeIterator.java:984)
        at org.eclipse.jgit.treewalk.WorkingTreeIterator.contentCheck(WorkingTreeIterator.java:924)
        at org.eclipse.jgit.treewalk.WorkingTreeIterator.isModified(WorkingTreeIterator.java:860)
        at org.eclipse.jgit.treewalk.WorkingTreeIterator.isModified(WorkingTreeIterator.java:815)
        at org.eclipse.jgit.treewalk.FileTreeIteratorJava7Test.testSymlinkActuallyModified(FileTreeIteratorJava7Test.java:198)

Theses tests are all working with a small repo that has just two entries:
'.git' and 'link' (a symbolic link that's being tested on). `listFiles()`
is called by FileTreeIterator to get a preliminary list of FileEntry
objects:

https://github.com/eclipse/jgit/blob/6d724dcd/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/FileTreeIterator.java#L139

Whether your tests appeared to pass or fail was dependent on the returned
order of files from `listFiles()`:

* ['.git', 'link'] - PASS (Eclipse Hudson appears to get this ordering)
* ['link', '.git'] - FAIL (My env, Ubuntu 14.04/Java 1.7.0_55)

The tree-iterator passes the resulting `FileEntry`s to it's init() method:

https://github.com/eclipse/jgit/blob/6d724dcd/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java#L639-L665

... where a count of valid entries is made (`entryCnt`), the 'invalid'
entries (like'.git') being left in the hinterland of the `entries` array.
The rearrangement in the entries array for our tests looks like this:

* ['.git', 'link'] -> ['link', 'link']
* ['link', '.git'] -> ['link', '.git']

In both cases, `entryCnt` is set to 1, meaning that the _valid_ portion of
the iterator is the same (ie ['link']), but that the portion after EOF,
which we reach by calling `fti.next(1)`, is _different_ depending on your
environment. The entry used by the iterator at that point will be either
'link' (if you're lucky) or '.git', which will blow up the test.

Note that somewhat ironically, the 'self-check' assertions don't catch
this bug, as 'path' data is only parsed _before_ EOF - so
`fti.getEntryPathString()` returns the string "link" (and the assertion
passes) regardless of whether you're about to read the '.git' entry or not.

Change-Id: Ie58a7bc76b740ee52881ebf555564a74379028d6
Signed-off-by: Roberto Tyley <roberto.tyley@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>