Commit Graph

3568 Commits

Author SHA1 Message Date
Christian Halstrick 714f677ca5 Add missing @since tags
Change-Id: Ia657e46b9abc8c8640f63f6ff579b2f8f2b01de4
2014-11-09 22:21:31 +01:00
Matthias Sohn 440f95363d 4.4 target platform should use Luna repository
Change-Id: I54cdfb5699f87bf86b0434aff0b9618e57a80757
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2014-11-09 21:57:29 +01:00
Matthias Sohn 9678e7db8a Merge "Add target platform for Mars using Orbit S-build" 2014-11-09 15:54:03 -05:00
Shawn Pearce cba3060969 Merge "Implement atomic refs update, if possible by database" 2014-11-07 22:04:34 -05:00
Stefan Beller 88c1b82e7a Implement atomic refs update, if possible by database
Inspired by the series[1], this implements the possibility to
have atomic ref transactions.
If the database supports atomic ref update capabilities, we'll
advertise these. If the client wishes to use this feature, either
all refs will be updated or none at all.

[1] http://thread.gmane.org/gmane.comp.version-control.git/259019/focus=259024

Change-Id: I7b5d19c21f3b5557e41b9bcb5d359a65ff1a493d
Signed-off-by: Stefan Beller <sbeller@google.com>
2014-11-07 18:51:18 -08:00
Matthias Sohn 5c2882ec67 Add target platform for Mars using Orbit S-build
updates:
- jsch to 0.1.51 (CQ 8889)
- ant to 1.9.4 (CQ 8890)

CQ: 8889
CQ: 8890
Change-Id: I31f331ce797994d164661b421bfbab33c289deaf
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2014-11-07 16:34:24 +01:00
Dani Megert 3e131a35e3 Don't use SSL anymore to avoid POODLE attack
For details about poodle see:
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-3566

Bug 450170
Change-Id: Ib169e88d9d51f4d0e6caa3a498f48edc81e0991d
Signed-off-by: Dani Megert <Daniel_Megert@ch.ibm.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2014-11-07 00:20:25 +01:00
Christian Halstrick 8456927b1b Make sure checkout doesn't report conflicts on ignored paths
In a situation where a certain path was ignored but a working tree file
with this path existed jgit didn't allow to checkout a branch which
didn't ignore this path but contained different content. JGit considered
this to be a checkout conflict to prevent overwriting the file in the
working tree and raised an error. This commit fixes this by ensuring
that ignored dirty working tree files don't lead to a checkout conflict.

Bug: 450169
Change-Id: I90288d314ffac73c24a9c70a5181f8243bd4679a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2014-11-06 15:27:46 -05:00
Matthias Sohn abb57e6b56 Do not swallow exception if IndexDiff hits invalid ignore param
Change-Id: I8a595e1f01a0731118d3c537be420222f7fec744
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2014-11-06 09:48:01 +01:00
Matthias Sohn d8fcc964a8 Fix non-externalized string warnings in IndexDiff
Change-Id: Ia803182114f0e8b418428e03601f9afc6542ed28
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2014-11-06 09:46:45 +01:00
Axel Richard 5328c8c916 Add new method IndexDiff#getPathsWithIndexMode
Get the list of paths that have the given file mode.

This helps EGit to efficiently determine which modified files are
symlinks and should be shown with a symlink icon in the staging view.

Bug: 429302
Change-Id: Id15f0c6f265667f5b8b57cc2d9f97de568371919
Signed-off-by: Axel Richard <axel.richard@obeo.fr>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2014-11-06 09:40:29 +01:00
Christian Halstrick 2532c28cb9 add missing @since tag in StatusCommand
Change-Id: Ie8d9c3878116488b973dfc80c7c97f174e769d3f
2014-11-04 09:43:58 +01:00
Matthias Sohn 8a398a9147 Add missing @since tags in SubmoduleWalk
Change-Id: Ica34e6709a34977422fd528cbd4df0044403e45d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2014-11-03 23:49:36 +01:00
Matthias Sohn c017ac4c85 Add missing @since tags
Change-Id: I27207bafe0ce31caab25ab9c0be1f22adf151783
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2014-11-03 17:08:39 +01:00
Christian Halstrick 696de653f3 Enhance SubmoduleWalk with a fast check whether a repo contains
submodules

Change-Id: Id37efb4f4dd77f3b8eb5607d15d32adeda3992d4
2014-11-03 04:33:10 -05:00
Christian Halstrick 6f0b92ff22 RebaseCommand should ignore submodule modifications
Before a rebase happens the RebaseCommand checks that the working tree
is clean. We don't want to start a rebase on a dirty working tree. If
the working tree is dirty a rebase should not be allowed. But
RebaseCommand should ignore modifications done to submodules. E.g. if a
submodules HEAD points to <x> but the root repository has in index that
the submodule should point to <y> then this should not prohibit a
rebase. Also native git allows a rebase in this case. Since jgit's
StatusCommand has learned to ignore submodule changes this is now used
by the RebaseCommand to determine the repository state correctly.

Bug: 446922
Change-Id: I487bf7484dca3f5501e6e514584e2871524eea19
2014-11-03 04:32:54 -05:00
Christian Halstrick 95172dea17 Support for Submodule configuration submodule.<name>.ignore
For each submodule native git allows to configure which modifications to
submodules should be ignored by the status command. It is possible to
ignore "none", "all", "dirty", "untracked" [1]. This configuration is
now supported by IndexDiff. The StatusCommand offers the possibility to
specify this mode.

[1] http://git-scm.com/docs/gitmodules

Change-Id: Ifd81d574a680f9b4152945ba70f8ec4af4f452c9
2014-11-03 04:32:03 -05:00
Andrey Loskutov 2f5a08798e Reimplementation of ignore rule parser
The current IgnoreRule/FileNameMatcher implementation scales not well
with huge repositories - it is both slow and memory expensive while
parsing glob expressions (bug 440732). Addtitionally, the "double star"
pattern (/**/) is not understood by the old parser (bug 416348).

The proposed implementation is a complete clean room rewrite of the
gitignore parser, aiming to add missing double star pattern support and
improve the performance and memory consumption.

The glob expressions from .gitignore rules are converted to Java regular
expressions (java.util.regex.Pattern). java.util.regex.Pattern code can
evaluate expression from gitignore rules considerable faster (and with
less memory consumption) as the old FileNameMatcher implementation.

CQ: 8828
Bug: 416348
Bug: 440732
Change-Id: Ibefb930381f2f16eddb9947e592752f8ae2b76e1
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2014-10-27 19:26:42 +01:00
Robin Stocker 6eca51923f Merge "Initialize 'pathLen' field also for empty directories" 2014-10-23 06:50:00 -04:00
Andrey Loskutov 4ea8c655d6 Initialize 'pathLen' field also for empty directories
Bug: 445363
Change-Id: Ia8428af84fb61ba0d572374a19e8e8c55b138a63
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
2014-10-23 12:31:49 +02:00
Shawn Pearce 2c25a1fde0 Merge "Add retainOnReset(RevFlag) to RevWalk to simplify reset usage" 2014-10-20 13:45:28 -04:00
Shawn Pearce 048dbf4173 Add retainOnReset(RevFlag) to RevWalk to simplify reset usage
Applications sometimes use a RevFlag instead of a Set<RevObject>
to track boolean state bits about objects being processed. However
this requires careful use of the resetRetain() methods to avoid an
accidental clearing of the RevFlag bits, effectively clearing the
Set<RevObject> the application wanted to track.

Simplify that use case by offering retainOnReset, a collection of
flags that are never cleared by the RevWalk.

Change-Id: I4c05b89b1398e4a4f371eac3a5d1d5edddec838f
2014-10-19 11:36:08 -07:00
Robin Stocker 590e1b7602 BundleWriter: Support including HEAD in bundle
Bug: 446813
Change-Id: Ide64aec2a995dd7ff6c1325c3ada242a4eb4565e
Signed-off-by: Robin Stocker <robin@nibor.org>
2014-10-19 14:40:29 +11:00
Matthias Sohn 5c85d5d58a Merge branch 'stable-3.5'
* stable-3.5:
  Prepare 3.5.2-SNAPSHOT builds
  JGit v3.5.1.201410131835-r
  Only hide gitdir if the repository isn't bare

Change-Id: I171e5fb8718cb6829bb1357859c95b4a29910ac6
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2014-10-14 17:51:53 +02:00
Matthias Sohn dcb52291a9 Prepare 3.5.2-SNAPSHOT builds
Change-Id: Ib2ccdebe80bad0b09d2d31889a3ab89d77e341f6
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2014-10-14 01:29:37 +02:00
Matthias Sohn 450ce163ef JGit v3.5.1.201410131835-r
Change-Id: I37e049c8e81f963cfb7c17f1af91fd4245766aee
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2014-10-14 00:38:49 +02:00
Christian Halstrick 2a01c98ea1 Merge "Only hide gitdir if the repository isn't bare" into stable-3.5 2014-10-13 11:57:55 -04:00
Matthias Sohn 13ffda0666 Fix ResetCommand to default to mixed reset
ResetCommand threw an NPE if neither mode nor path was defined. Instead
it should default to a mixed reset like native git does.

Change-Id: I455902394f9e7b0c7afae42381f34838f7f2a138
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2014-10-13 16:41:58 +02:00
Matthias Sohn 74c337eadb Update URL of JGit Maven release repository
This repository is required to allow clirr to compare the API of the
checked out version against the API of the latest release of jgit. The
old Maven repository on the download server was replaced by Nexus a long
time back.

Change-Id: I05125407fb72531c6831ec721064b0dad278bde5
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2014-10-13 10:25:14 +02:00
Matthias Sohn 2983d224eb Merge branch 'stable-3.5'
* origin/stable-3.5:
  When marking commits as uninteresting don't care if the tree exists

Change-Id: I66559a72ed7284cb721cf929512af884c0db2d61
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2014-10-12 23:45:45 +02:00
Matthias Sohn a57670b11f Compare API changes against 3.5.0
Change-Id: I10e51aea66f1446dd1d6d367ea113d824252d82b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2014-10-12 22:24:16 +02:00
Matthias Sohn df82727bda Enable maven site generation for jgit
Generating the site:
$ mvn site:site

Local staging of the site:
$ mvn site:stage
the site is staged under ./target/staging/

If you can connect to build.eclipse.org over ssh
(ask webmaster if you are a committer and need ssh access)
you can deploy a local build of the site:
$ mvn site:deploy
The site is deployed under
http://download.eclipse.org/jgit/site/${project.version}

To select the ssh key to use for deploying over ssh add the following
section to your Maven settings.xml:
<server>
  <id>jgit.website</id>
  <username>username</username>
  <privateKey>${user.home}/.ssh/id_rsa</privateKey>
  <filePermissions>664</filePermission>
  <directoryPermissions>775</directoryPermissions>
  <configuration></configuration>
</server>

To deploy the site from Hudson https://hudson.eclipse.org/egit/
enable the Maven profile "build-server".

Change-Id: I7e64c8560ca75196d2232f111ffad953c14f013f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
(cherry picked from commit 6d00f0a09c)
2014-10-12 22:22:16 +02:00
Matthias Sohn 42c749291e Generate javadocs as part of Maven site project reports
see http://maven.apache.org/plugins/maven-javadoc-plugin/usage.html

Change-Id: I6dc5dddea0adbb4abf5560d5d1c833408e944082
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
(cherry picked from commit a3d0b0d903)
2014-10-12 22:21:56 +02:00
Matthias Sohn 05e530c56c [Java 8] Configure doclint to accept missing descriptions
We avoid trivial descriptions in JavaDoc. Hence configure
doclint to not fail on missing descriptions.

Change-Id: Iba3d5aec18cc7d7f43e53fa6789f0dede9996fb7
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
(cherry picked from commit 54dc4b20b3)
2014-10-12 22:21:00 +02:00
Christian Halstrick 88b25a58f0 When marking commits as uninteresting don't care if the tree exists
When during an ObjectWalk commits are marked as uninteresting we should
be tolerant against the situation that the commit exists in the repo but
the referenced tree is not exisiting. Since commit
c4797fe986 we are throwing
MissingObjectException in such a case. This semantic differs from native
git behaviour and may cause push operations to fail while they would
work in native git. See:
http://dev.eclipse.org/mhonarc/lists/egit-dev/msg03585.html

Bug: 445744
Change-Id: Ib7dec10fd2ef1adbb8adbabb9d3d5a64e554286a
2014-10-10 10:52:43 -04:00
Christian Halstrick 6ed6494b8a Revert "When marking commits as uninteresting don't care if the tree exists"
This reverts commit 441fdb54ef.
2014-10-10 00:09:44 +02:00
Christian Halstrick 441fdb54ef When marking commits as uninteresting don't care if the tree exists
When during an ObjectWalk commits are marked as uninteresting we should
be tolerant against the situation that the commit exists in the repo but
the referenced tree is not exisiting. Since commit
c4797fe986 we are throwing
MissingObjectException in such a case. This semantic differs from native
git behaviour and may cause push operations to fail while they would
work in native git. See:
http://dev.eclipse.org/mhonarc/lists/egit-dev/msg03585.html

Bug: 445744
Change-Id: Ib7dec10fd2ef1adbb8adbabb9d3d5a64e554286a
2014-10-10 00:00:45 +02:00
Matthias Sohn 668acc6fc5 Only hide gitdir if the repository isn't bare
This problem was raised on the jgit list
https://dev.eclipse.org/mhonarc/lists/jgit-dev/msg02675.html

Change-Id: I8ce8a159120ce3747d31d6f012c6d2c0d0ce7917
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2014-10-07 09:28:58 +02:00
Matthias Sohn 9fd1325ecb Merge branch 'stable-3.5'
* stable-3.5:
  Prepare 3.5.1-SNAPSHOT builds
  JGit v3.5.0.201409260305-r
  Fix PackWriterBitmapWalker handling non-existing uninteresting objects
  Enable maven site generation for jgit
  Generate javadocs as part of Maven site project reports
  Compare API changes with clirr against 3.4.1
  [cli] Use chaining credentials provider to enable .netrc
  Add chaining credentials provider
  [Java 8] Configure doclint to accept missing descriptions
  Do not use .netrc implicitly if no CredentialsProvider was set
  Prepare post 3.5.0-rc1 builds
  JGit 3.5.0.201409071800-rc1
  Fix the ls-remote command when there is no local repo

Change-Id: Iaa4485cac6ff9c7917380e89e12e416e0f52a557
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2014-09-26 15:45:46 +02:00
Matthias Sohn 848186da86 Prepare 3.5.1-SNAPSHOT builds
Change-Id: Ibf89f996c9d9a7e431ee09261987bb76246de441
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2014-09-26 14:56:34 +02:00
Matthias Sohn 24a2f9e53d JGit v3.5.0.201409260305-r
Change-Id: Ibf382bda3dcbb4b70829b1dd3a8abfd07bc4879e
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2014-09-26 09:02:45 +02:00
Christian Halstrick fa4f00b7ed Fix PackWriterBitmapWalker handling non-existing uninteresting objects
When writing new packs it should be allowed to specify objects as "have"
(objects which should not be included in the pack) which do not exist in
the local repository.

This works with the traditional PackWriter, but when PackWriter was
working on a repository with bitmap indexes and used
PackWriterBitmapWalker then this feature was broken. Non-existing "have"
objects lead to MissingObjectExceptions. That broke push and Gerrit
replication. When the replication target had branches unknown to the
replication source then the source repository wanted to build pack files
where "have" included branch-tips which were unknown in the source 
repository.

Bug: 427107
Change-Id: I6b6598a1ec49af68aa77ea6f1f06e827982ea4ac
Also-by: Matthias Sohn <matthias.sohn@sap.com>
2014-09-25 19:01:42 -04:00
Matthias Sohn 6d00f0a09c Enable maven site generation for jgit
Generating the site:
$ mvn site:site

Local staging of the site:
$ mvn site:stage
the site is staged under ./target/staging/

If you can connect to build.eclipse.org over ssh
(ask webmaster if you are a committer and need ssh access)
you can deploy a local build of the site:
$ mvn site:deploy
The site is deployed under
http://download.eclipse.org/jgit/site/${project.version}

To select the ssh key to use for deploying over ssh add the following
section to your Maven settings.xml:
<server>
  <id>jgit.website</id>
  <username>username</username>
  <privateKey>${user.home}/.ssh/id_rsa</privateKey>
  <filePermissions>664</filePermission>
  <directoryPermissions>775</directoryPermissions>
  <configuration></configuration>
</server>

To deploy the site from Hudson https://hudson.eclipse.org/egit/
enable the Maven profile "build-server".

Change-Id: I7e64c8560ca75196d2232f111ffad953c14f013f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2014-09-25 14:55:40 +02:00
Matthias Sohn a3d0b0d903 Generate javadocs as part of Maven site project reports
see http://maven.apache.org/plugins/maven-javadoc-plugin/usage.html

Change-Id: I6dc5dddea0adbb4abf5560d5d1c833408e944082
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2014-09-25 11:32:13 +02:00
Matthias Sohn 73809b5e18 Compare API changes with clirr against 3.4.1
Change-Id: I76dcbb763984e7a7a526e29ec379d1f923b4253f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2014-09-25 11:15:57 +02:00
Matthias Sohn 00802b6317 [cli] Use chaining credentials provider to enable .netrc
If available use credentials in .netrc otherwise prompt the user
if jgit command line needs credentials for remote operations.

Change-Id: Iea1f595618edfb87a37137db08bac8ca2d500ebc
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2014-09-24 15:27:36 +02:00
Matthias Sohn 3f0d9795ea Add chaining credentials provider
The chaining credentials provider sequentially tries to obtain
credentials from a list of credential providers and returns the
credentials from the first provider which can provide them.

Change-Id: I499f304119d7066d011dbde3556dee6facee8ab0
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2014-09-24 15:27:35 +02:00
Andrey Loskutov 85b62b4c9c Fixed API violation errors for 3.6 in ConfigConstants
Change-Id: Ibeb09eb23d47412fa93493bb4e81d24d437e31bc
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
2014-09-24 11:26:06 +02:00
Matthias Sohn 54dc4b20b3 [Java 8] Configure doclint to accept missing descriptions
We avoid trivial descriptions in JavaDoc. Hence configure
doclint to not fail on missing descriptions.

Change-Id: Iba3d5aec18cc7d7f43e53fa6789f0dede9996fb7
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2014-09-23 00:32:47 +02:00
Christian Halstrick 227357f929 Add "aggressive" option to GC
JGit should offer the possibility to do a garbage collection in
"aggressive" mode. In this mode garbage collection more aggressively
optimize the repository at the expense of taking much more time.
Technically a aggressive mode garbage collection differs from a
non-aggressive one by:
- not reusing packed objects found in old packs. Recompress every object
- the configuration pack.window is set to 250 (the default is 10)
- the configuration pack.depths is set to 250 (the default is 50)

The associated classes in org.eclipse.jgit.api and the command line
command in org.eclipse.jgit.pgm expose this new option.

The configuration parameters gc.aggressiveDepth and gc.aggressiveWindow
have been introduced to configure this feature.

Bug: 444332
Change-Id: I024101f2810acf6be13ce144c9893d98f5c4ae76
2014-09-19 09:17:41 -04:00