]> source.dussan.org Git - jgit.git/log
jgit.git
10 years agoPrepare 3.4.0-SNAPSHOT builds 93/22893/1
Matthias Sohn [Wed, 5 Mar 2014 01:14:08 +0000 (02:14 +0100)]
Prepare 3.4.0-SNAPSHOT builds

Change-Id: I907c6f1834c06b8ab4d3e0f76dde475faea7b4a5
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoMerge branch 'stable-3.3' 92/22892/1
Matthias Sohn [Wed, 5 Mar 2014 01:02:03 +0000 (02:02 +0100)]
Merge branch 'stable-3.3'

* stable-3.3:
  Update scripts to deploy jgit on Maven central
  Prepare 3.3.1-SNAPSHOT builds
  JGit v3.3.0.201403021825-r
  Fix merge/cherry-picking in CRLF mode
  Expose the received pack size in ReceivePack
  Revert "Add getPackFile to ReceivePack to make PostReceiveHook more usable"
  Avoid an NPE after 7b01a5369210
  Add a launcher for Java 7 tests
  Remove obsolete getRepositoryMethod from WorkingTreeIterator
  Fix NPE when WorkingTreeIterator does not have a repository set
  Add getPackFile to ReceivePack to make PostReceiveHook more usable
  Possibility to limit the max pack size on receive-pack
  Package httpclient and httpcore in o.e.j.http.apache.feature

Change-Id: I814a150980854bbaabd767f97b062d247af6cb50
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoUpdate scripts to deploy jgit on Maven central 89/22889/1
Matthias Sohn [Tue, 4 Mar 2014 23:43:21 +0000 (00:43 +0100)]
Update scripts to deploy jgit on Maven central

Change-Id: I760ad82f2455cfc2cdc76c9331a03b09aebb2349
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoPrepare 3.3.1-SNAPSHOT builds 88/22888/1
Matthias Sohn [Tue, 4 Mar 2014 23:20:11 +0000 (00:20 +0100)]
Prepare 3.3.1-SNAPSHOT builds

Change-Id: If15560f2731e54dbf9db88d8a308b4c25ce27e8e
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoMerge "Add setContains to ListBranchCommand (branch --contains)"
Robin Rosenberg [Mon, 3 Mar 2014 23:10:44 +0000 (18:10 -0500)]
Merge "Add setContains to ListBranchCommand (branch --contains)"

10 years agoMerge "DirCache.findEntry(byte[], in) made public"
Robin Rosenberg [Mon, 3 Mar 2014 22:56:10 +0000 (17:56 -0500)]
Merge "DirCache.findEntry(byte[], in) made public"

10 years agoMerge "Windows: Test that we can create a symlink before the target is created"
Robin Rosenberg [Mon, 3 Mar 2014 22:54:05 +0000 (17:54 -0500)]
Merge "Windows: Test that we can create a symlink before the target is created"

10 years agoAdd missing @Deprecated to deprecated fields and methods 03/22803/1
Shawn Pearce [Mon, 3 Mar 2014 18:37:06 +0000 (10:37 -0800)]
Add missing @Deprecated to deprecated fields and methods

Java spec requires the @Deprecated annotation on any deprecated
field or method. Add the missing annotation to fields and methods
already declared deprecated in the javadoc.

Change-Id: Ic0ef24b43cfd99ac947e771ef5a28e493c304274

10 years agoJGit v3.3.0.201403021825-r 35/22735/1 v3.3.0.201403021825-r
Matthias Sohn [Sun, 2 Mar 2014 23:26:54 +0000 (00:26 +0100)]
JGit v3.3.0.201403021825-r

Change-Id: Iaf3da455f7d6f691617299e881154ff8185a9d46
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoFix merge/cherry-picking in CRLF mode 60/22060/3
Robin Rosenberg [Sun, 15 Dec 2013 15:57:01 +0000 (16:57 +0100)]
Fix merge/cherry-picking in CRLF mode

This fixes a case where we have CRLF in the repo but
LF in the worktree and are in autocrlf mode.

Change-Id: I0388270c1cf0fd22dfd513bcaa404eb97268d39d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoMerge "Expose the received pack size in ReceivePack" into stable-3.3
Robin Rosenberg [Sun, 2 Mar 2014 13:17:18 +0000 (08:17 -0500)]
Merge "Expose the received pack size in ReceivePack" into stable-3.3

10 years agoMerge "Revert "Add getPackFile to ReceivePack to make PostReceiveHook more usable...
Robin Rosenberg [Sun, 2 Mar 2014 13:14:14 +0000 (08:14 -0500)]
Merge "Revert "Add getPackFile to ReceivePack to make PostReceiveHook more usable"" into stable-3.3

10 years agoExpose the received pack size in ReceivePack 16/22716/2
Saša Živkov [Fri, 28 Feb 2014 17:34:59 +0000 (18:34 +0100)]
Expose the received pack size in ReceivePack

PostReceiveHooks can make use of this information to, for example,
update a cached size of the Git repository.

Change-Id: I2bf1200959a50531e2155a7609c96035ba45b10d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoRevert "Add getPackFile to ReceivePack to make PostReceiveHook more 17/22717/1
Saša Živkov [Fri, 28 Feb 2014 12:47:40 +0000 (13:47 +0100)]
Revert "Add getPackFile to ReceivePack to make PostReceiveHook more
usable"

This reverts commit 2670fd427cd4aad49ccdb6dde66271fdffff86f8.

By returning an instance of File from the ReceivePack.getPackFile the
abstraction of the persistence implementation was broken.

Change-Id: I28e3ebf3a659a7cbc94be51bba9e1ad338f2b786
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoAvoid an NPE after 7b01a5369210 12/22712/1
Robin Rosenberg [Sat, 1 Mar 2014 11:44:34 +0000 (12:44 +0100)]
Avoid an NPE after 7b01a5369210

While fixing an NPE, I introduced another one in a deprecated isModified
method. It cannot avoid NPE's entirely, which is the reason the method
is deprecated

Change-Id: I5147c1c94621586dd84bd11e6090a954523b6c1c

10 years agoAdd a launcher for Java 7 tests 54/22654/2
Robin Rosenberg [Fri, 28 Feb 2014 06:19:29 +0000 (07:19 +0100)]
Add a launcher for Java 7 tests

Just like we have launcher for other packages

Change-Id: I140b88b8fdcab08d6515cd1f0ba9a53a9701f60d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoRemove obsolete getRepositoryMethod from WorkingTreeIterator 53/22653/2
Robin Rosenberg [Fri, 28 Feb 2014 06:16:42 +0000 (07:16 +0100)]
Remove obsolete getRepositoryMethod from WorkingTreeIterator

The method was added for symlink support, but isn't needed anymore.
Since it was added for this release it's like it never existed.

Change-Id: I422cd1dcdfa40b25ba3d6e08b112159dae9a4353
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoFix NPE when WorkingTreeIterator does not have a repository set 52/22652/2
Robin Rosenberg [Fri, 28 Feb 2014 06:15:08 +0000 (07:15 +0100)]
Fix NPE when WorkingTreeIterator does not have a repository set

It's strange that we have that member since it is not so clear
when it it set or not.

Change-Id: I53903a264f46866d249901a3cd9f9295028aa6bd
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoMerge "Don't raise checkout conflict for file missing in working tree"
Christian Halstrick [Thu, 27 Feb 2014 21:17:56 +0000 (16:17 -0500)]
Merge "Don't raise checkout conflict for file missing in working tree"

10 years agoCLI clone command should support --no-checkout 41/22441/2
Kaloyan Raev [Mon, 24 Feb 2014 14:03:51 +0000 (16:03 +0200)]
CLI clone command should support --no-checkout

doCheckout() is called only if --no-checkout option is not set.

Bug: 428917
Change-Id: I350bef446dd7a37613b9506aae99679569bd36e1
Signed-off-by: Kaloyan Raev <kaloyan.r@zend.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoDon't raise checkout conflict for file missing in working tree 29/22529/2
Christian Halstrick [Tue, 25 Feb 2014 16:29:45 +0000 (17:29 +0100)]
Don't raise checkout conflict for file missing in working tree

During a checkout we want to prevent to overwrite unsaved local file
content. Jgit was therefore checking whether the file to overwrite is
dirty or missing and would raise a conflict if this was the case. That
was wrong. It should only check if the file is dirty. It's ok to
"overwrite" a missing/non-existing file.

Change-Id: I63c3a94f663c87f09170fdf8b1b1bf4ed5246fc5
Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
10 years agoMerge "Add a missing @since tag"
Matthias Sohn [Wed, 26 Feb 2014 13:50:42 +0000 (08:50 -0500)]
Merge "Add a missing @since tag"

10 years agoMerge "Files should be deleted with "retry" option"
Matthias Sohn [Wed, 26 Feb 2014 13:49:17 +0000 (08:49 -0500)]
Merge "Files should be deleted with "retry" option"

10 years agoAdd a missing @since tag 64/22564/1
Christian Halstrick [Wed, 26 Feb 2014 13:29:51 +0000 (14:29 +0100)]
Add a missing @since tag

Change-Id: Ie34a4a9c4c47c2f27579094d74a7849fc26a323b

10 years agoFiles should be deleted with "retry" option 61/22461/3
Marc Strapetz [Mon, 24 Feb 2014 17:38:20 +0000 (18:38 +0100)]
Files should be deleted with "retry" option

Some of our Windows users have reported sporadic file system access
problems related to ObjectDirectory(Inserter) file deletion code in
combination with antiviral/firewall tools. For one of these users the
problem was fairly reproducible and changing deletion to RETRY solved
his problem.

Change-Id: I1e4001d5557fca693b7bac401268599467cb0c9e
Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>‌
10 years agoDirCacheEntry: access to raw path 56/22456/3
Marc Strapetz [Mon, 27 May 2013 08:32:47 +0000 (10:32 +0200)]
DirCacheEntry: access to raw path

Change-Id: I5d1f6c4b5b3d7a971367cdd0cc9fa4022dff5b85
Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>‌
10 years agoAdd getPackFile to ReceivePack to make PostReceiveHook more usable 46/22446/4
Saša Živkov [Mon, 24 Feb 2014 16:03:40 +0000 (17:03 +0100)]
Add getPackFile to ReceivePack to make PostReceiveHook more usable

Having access to the pack file that was created by the ReceivePack
may be useful for post receive hooks. For example, a hook may want
to check the size of the received pack and the created index.

Change-Id: I4d51758e4565d32c9f8892242947eb72644b847d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoPossibility to limit the max pack size on receive-pack 05/22505/1
Saša Živkov [Thu, 30 Jan 2014 14:04:43 +0000 (15:04 +0100)]
Possibility to limit the max pack size on receive-pack

The maxPackSizeLimit, when set, will reject a pack if it exceeds
that limit.

This feature is intended to provide a mechanism to control disk space
quota on Git repositories.

Change-Id: I83d8db670875c395f8171461b402083323e623a5
CQ: 7896

10 years agoFix possible NPE in Repository.resolve 62/22462/1
Marc Strapetz [Thu, 16 Jan 2014 15:55:50 +0000 (16:55 +0100)]
Fix possible NPE in Repository.resolve

Change-Id: I9b19cd90b338a4c3cae5661c658526b7e98c95d1
Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>‌
10 years agoDirCache.findEntry(byte[], in) made public 58/22458/1
Marc Strapetz [Mon, 27 May 2013 08:32:47 +0000 (10:32 +0200)]
DirCache.findEntry(byte[], in) made public

Change-Id: Ice64e3b0e5d67a39690aa24e41c954b8ce312d49
Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>‌
10 years agoPackage httpclient and httpcore in o.e.j.http.apache.feature 08/22408/1
Matthias Sohn [Mon, 24 Feb 2014 00:19:00 +0000 (01:19 +0100)]
Package httpclient and httpcore in o.e.j.http.apache.feature

When adding the new feature o.e.j.http.apache.feature in
I4adfecd56d84ee24a50cadb1700c8be56e4172a3 in order to make the
httpclient based implementation optional I missed to also move the
apache libraries.

Change-Id: I7285458a70aee3dd6faf739b68a0b5783b8da01d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoMerge branch 'stable-3.3' 93/22393/1
Matthias Sohn [Fri, 21 Feb 2014 21:40:35 +0000 (22:40 +0100)]
Merge branch 'stable-3.3'

* stable-3.3:
  Move Apache httpclient based HTTP support to a separate bundle
  Prepare post 3.3.0RC1 builds
  JGit v3.3.0.201402191814-rc1
  [findBugs] Don't ignore exceptional return value of File.mkdir()
  [findBugs] Don't rely on default encoding
  [findBugs] Don't call toString() on a string

Change-Id: I50f91e1d3c1d29a44502f4bb9f0e6c05e21342b7
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoMove Apache httpclient based HTTP support to a separate bundle 38/22338/3
Matthias Sohn [Thu, 20 Feb 2014 21:07:48 +0000 (22:07 +0100)]
Move Apache httpclient based HTTP support to a separate bundle

This move avoids that all consumers of org.eclipse.jgit depend on Apache
httpclient. Also add another feature to make this optional for OSGi
consumers as well.

Change-Id: I5ef5e00c53678b9e1d7cfd54bbca3ff6f1c1c967
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoPrepare post 3.3.0RC1 builds 80/22280/1
Matthias Sohn [Thu, 20 Feb 2014 00:03:24 +0000 (01:03 +0100)]
Prepare post 3.3.0RC1 builds

Change-Id: I0d808f8733a490b75bbcaacedb4b095e05fab32e
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoJGit v3.3.0.201402191814-rc1 77/22277/1 v3.3.0.201402191814-rc1
Matthias Sohn [Wed, 19 Feb 2014 23:14:45 +0000 (00:14 +0100)]
JGit v3.3.0.201402191814-rc1

Change-Id: Ida3a0417ae646ce37214153f49a85de2be3dd4fd
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years ago[findBugs] Don't ignore exceptional return value of File.mkdir() 37/22137/2
Matthias Sohn [Tue, 18 Feb 2014 08:25:31 +0000 (09:25 +0100)]
[findBugs] Don't ignore exceptional return value of File.mkdir()

Change-Id: Ic4c61472412aa158a355bb444805cde8c5d2833a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years ago[findBugs] Don't rely on default encoding 36/22136/2
Matthias Sohn [Tue, 18 Feb 2014 08:24:30 +0000 (09:24 +0100)]
[findBugs] Don't rely on default encoding

Change-Id: I9be2ffe95e8d716326ba63b67672741ac316f9a5
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years ago[findBugs] Don't call toString() on a string 35/22135/2
Matthias Sohn [Tue, 18 Feb 2014 08:23:13 +0000 (09:23 +0100)]
[findBugs] Don't call toString() on a string

Change-Id: I0b91ffd473e2f14623ddf409e4f0f342c8941e42
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoFix diff header on renamed or copied files 59/22059/4
Shawn Pearce [Fri, 14 Feb 2014 17:53:48 +0000 (09:53 -0800)]
Fix diff header on renamed or copied files

When git-core renames or copies a file and the mode differs the
header shows the mode change first, then the rename or copy data:

  diff --git a/COPYING b/LICENSE
  old mode 100644
  new mode 100755
  similarity index 92%
  rename from COPYING
  rename to LICENSE
  index d645695..54863be
  --- a/COPYING
  +++ b/LICENSE
  @@ -56,20 +56,6 @@

JGit relies on this ordering inside of FileHeader. Parsing "new file
mode NNN" after "copy from/to" or "rename from/to" resets the change
type to be ADD, losing the COPIED or RENAMED status and old path.

This fixes a 4 year old bug in Gerrit Code Review that prevents
opening a file for review if the file was copied from another file,
modified in this change, and the mode was updated (e.g. execute
bit was added).

Change-Id: If4c9ecd61ef0ca8e3e1ea857301f7b5c948efb96
[ms: added test case]
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoAdd an implementation for HttpConnection using Apache HttpClient 91/22091/3
Christian Halstrick [Sun, 4 Aug 2013 21:37:50 +0000 (23:37 +0200)]
Add an implementation for HttpConnection using Apache HttpClient

This change implements the http connection abstraction with the help of
org.apache.http.client.HttpClient. The default implementation used by
JGit is still the JDK HttpURLConnection. But now JGit users have the
possibility to switch completely to org.apache.httpclient. The reason
for this is that in certain (e.g. cloud) environments you are forced to
use the org.apache classes.

Change-Id: I0b357f23243ed13a014c79ba179fa327dfe318b2
Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoIntroduce an abstraction for HTTP connections 90/22090/3
Christian Halstrick [Sun, 4 Aug 2013 20:49:47 +0000 (22:49 +0200)]
Introduce an abstraction for HTTP connections

Previously all HTTP communication was done with the help of
java.net.HttpUrlConnection. In order to make JGit usable in environments
where the direct usage of such connections is not allowed but where the
environment provides other means to get network connections an
abstraction for connections is introduced. The idea is that new
implementations of this interface will be introduced which will not use
java.net.HttpUrlConnection but use e.g.
org.apache.client.http.HttpClient to provide network connections.

One example: certain cloud infrastructures don't allow that components
in the cloud communicate directly with HttpUrlConnection. Instead they
provide services where a component can ask for a connection (given a
symbolic name for the destination) and where the infrastructure returns
a preconfigured org.apache.http.client.HttpClient. In order to allow
JGit to be running in such environments we need the abstraction
introduced in this commit.

Change-Id: I3b06629f90a118bd284e55bb3f6465fe7d10463d
Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoRemove dead isBinary method from DiffFormatter 58/22058/2
Shawn Pearce [Fri, 14 Feb 2014 17:48:50 +0000 (09:48 -0800)]
Remove dead isBinary method from DiffFormatter

This method always returns false and is private so it cannot be
overridden at runtime by a subclass. Drop the method and the branch
that can never be taken.

Change-Id: I4d3edbf469c6739dca191e62ea580bdb534b67a4

10 years agoAdd missing static qualifier in DiffFormatter 57/22057/2
Shawn Pearce [Fri, 14 Feb 2014 17:46:52 +0000 (09:46 -0800)]
Add missing static qualifier in DiffFormatter

These methods do not touch instance members and can avoid the
implicit "this" argument.

Change-Id: I01c30bb22266eed1c9db18bdf9f90c1c1590e3ec
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoAllow programmatic remote configuration for PullCommand 15/22015/1
Matthias Sohn [Tue, 7 Jan 2014 09:15:14 +0000 (10:15 +0100)]
Allow programmatic remote configuration for PullCommand

Also imply remoteBranchName to match current branch name if it wasn't
configured in branch configuration.

Bug: 424812
Change-Id: Id852cedaefb2a537b6aa3c330b9861efad052f11
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoFix a NullPointerException if properties file doesn't exist 74/16774/2
James Yonan [Wed, 25 Sep 2013 18:24:16 +0000 (12:24 -0600)]
Fix a NullPointerException if properties file doesn't exist

For example with following URL,

  amazon-s3://.jgit@mybucket/foo.git

if ~/.jgit is missing, jgit command will throw a NullPointerException.

With this patch, a reasonable error message will be emitted:

  fatal: Cannot read file /Users/jamesyonan/.jgit

Change-Id: I1d366f2d55e170d2972715c657c8e2d10c8d87d2
Signed-off-by: James Yonan <james@openvpn.net>
10 years agoUse branch.<x>.mergeoptions and merge.ff as defaults for merging 85/20785/5
Konrad Kügler [Sat, 18 Jan 2014 12:00:08 +0000 (13:00 +0100)]
Use branch.<x>.mergeoptions and merge.ff as defaults for merging

Read options that control squashing, whether or not to commit the merge
and regarding fast forwarding from the configuration and use them if no
explicit values for these options have been provided to MergeCommand.

Change-Id: Ifdaed4b5e4adc142657c03c8e78b709a99eeddbd
Signed-off-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoNon-Fast-Forward Ref-Updates: Omit isMergedInto() calls 26/21226/3
Roberto Tyley [Wed, 29 Jan 2014 00:32:55 +0000 (00:32 +0000)]
Non-Fast-Forward Ref-Updates: Omit isMergedInto() calls

When the caller specifies to JGit in advance that a ref-update is a
non-fast-forward update, and that those are permitted, we should never
need to call the potentially expensive isMergedInto() check. Re-checking
that the older commit is /not/ reachable from the newer is superfluous.

http://dev.eclipse.org/mhonarc/lists/jgit-dev/msg02258.html

Change-Id: I4bbf593de4dcea6b6f082881c1a33cb3a6a7fb89
Signed-off-by: Roberto Tyley <roberto.tyley@gmail.com>
10 years agoInitialise ReceiveCommand status to NOT_ATTEMPTED for all constructors 25/21225/2
Roberto Tyley [Wed, 29 Jan 2014 00:01:53 +0000 (00:01 +0000)]
Initialise ReceiveCommand status to NOT_ATTEMPTED for all constructors

Formerly the 4-arg constructor did not do this, which was unfortunate
as that constructor's the only way for an external user of JGit to set
the /type/ of the ref-update - which you might want to do to indicate
that the update is expected to be a UPDATE_NONFASTFORWARD, and thus does
not require expensive isMergedInto() calculations:

http://dev.eclipse.org/mhonarc/lists/jgit-dev/msg02258.html

Change-Id: I84c5e4927131e105bed93e31a62da6367c78de32
Signed-off-by: Roberto Tyley <roberto.tyley@gmail.com>
10 years agoUse fetch.prune and remote.<name>.prune to set prune mode when fetching 45/21845/2
Konrad Kügler [Tue, 11 Feb 2014 22:01:04 +0000 (23:01 +0100)]
Use fetch.prune and remote.<name>.prune to set prune mode when fetching

When no explicit value is set via FetchCommand.setRemoveDeletedRefs()
checks if pruning is enabled in the configuration.

The following commit introduced the prune config to C Git:
https://github.com/git/git/commit/737c5a9cde708d6995c765b7c2e95033edd0a896

Change-Id: Ida79d335218e1c9f5c6e2ce03386ac8a1c0b212e
Signed-off-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoWindows: Test that we can create a symlink before the target is created 85/21585/15
Robin Rosenberg [Wed, 5 Feb 2014 20:24:41 +0000 (21:24 +0100)]
Windows: Test that we can create a symlink before the target is created

According to Win32 API, you need to specificy whether a symlink
points to a file or directory. These tests suggests a symlink created
for a file, can actually point to a directory. We can also create the
link before the target exists, so at least in this respect Windows
symbolic links appears to work as POSIX links.

On POSIX systems these tests have no relevance.

Change-Id: Id3991a4fc4333087c6f569acf04f503b0a0f170d

10 years agoAdd some tests cases on files modes for symbolic links 37/19237/20
Axel Richard [Tue, 3 Dec 2013 09:25:05 +0000 (10:25 +0100)]
Add some tests cases on files modes for symbolic links

Test that the file mode of a file is the one expected before and after a
checkout. Tests between symlink and file, symlink and folder, symlink
and missing.

Change-Id: If65a85a5667e25103eb9fd328a8723e29de04a1f
Signed-off-by: Axel Richard <axel.richard@obeo.fr>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoAdd some test cases for symbolic links with Java7 95/15395/21
Robin Rosenberg [Wed, 10 Jul 2013 22:19:10 +0000 (00:19 +0200)]
Add some test cases for symbolic links with Java7

Change-Id: Ia4c9c7902316bc0a90fb89d8dea9902835c06dfa

10 years agoNormalize paths on OS X 96/15396/21
Robin Rosenberg [Wed, 10 Jul 2013 23:11:12 +0000 (01:11 +0200)]
Normalize paths on OS X

Java normalizes paths to NFC, but other source may not, e.g Eclipse.

Bug: 413390
Change-Id: I08649ac58c9b3cb8bf12794703e4137b1b4e94d5
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoRecognize symlinks in the FileTreeIterator 94/15394/17
Robin Rosenberg [Wed, 10 Jul 2013 22:18:33 +0000 (00:18 +0200)]
Recognize symlinks in the FileTreeIterator

We did this for the Eclipse Platform in the ContainerTreeIterator.

Change-Id: I80d8157cc0dd99d57e2ed5d7cd8b13525a0c62b1

10 years agoAdd special case to WorkingTreeIterator for matching unnormalized symlinks 93/15393/17
Robin Rosenberg [Wed, 10 Jul 2013 22:17:23 +0000 (00:17 +0200)]
Add special case to WorkingTreeIterator for matching unnormalized symlinks

If there is an unnormalized symbolic link in the index, lie that it
matches a normalized link in the working tree. This does not make the
case completely invisible everywhere though, but it helps to some
degree.

Change-Id: I599fb71648c41fa2310049d0e0040b3c9f09386b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoFileUtils.delete does not recurse via symlinks 90/15390/16
Robin Rosenberg [Wed, 10 Jul 2013 20:20:30 +0000 (22:20 +0200)]
FileUtils.delete does not recurse via symlinks

Change-Id: I134cfbda47f4d252fec1a16034e2e78b73cd5081

10 years agoUse fileAttributes to get more attributes in one go 42/9642/30
Robin Rosenberg [Thu, 23 Jan 2014 05:07:12 +0000 (06:07 +0100)]
Use fileAttributes to get more attributes in one go

On Windows the length reported by FileAttributes is the size
of the target file (a bug, I guess) rather than the link,
so we read the linke and look at the length of the link instead.

Bug: 353771
Change-Id: I834b06d0447f84379612b8c9190fa77093617595
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoFix RevWalkUtils.findBranchesReachableFrom not finding some branches 18/20618/5
Robin Stocker [Tue, 14 Jan 2014 15:56:01 +0000 (16:56 +0100)]
Fix RevWalkUtils.findBranchesReachableFrom not finding some branches

The "cut off" optimization causes it to not include branches that
contain the specified commit but happen to share commits with a branch
that does not contain the commit.

An example:

      -B foo
        \
    -A---C master

findBranchesReachableFrom for commit A with both branches as input may
not return master (depending on the order of the input). The reason is
that A is not contained in foo, and therefore the old code would put B
in the cutOff set. When then walking the master commits and B is
checked, it is found in the cutOff set and the walk is aborted, causing
master not to be returned even though it should.

Bug: 425674
Change-Id: I2c0c406ce5fcc9a03538b483473af930d4895d30
Signed-off-by: Robin Stocker <robin@nibor.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoLength of symbolic link is the number of bytes, not characters 89/15389/13
Robin Rosenberg [Wed, 10 Jul 2013 15:33:50 +0000 (17:33 +0200)]
Length of symbolic link is the number of bytes, not characters

Change-Id: I6b615f0d5da4339f1f23a29bcaeb80f0346f5764

10 years agoAdd delete support to FS 84/9384/36
Robin Rosenberg [Thu, 27 Dec 2012 11:45:59 +0000 (12:45 +0100)]
Add delete support to FS

Change-Id: Ib6f6fd5ef4a0c9b2062445ac4a0c9d1131e401bf

10 years agoDynamically detect if Windows supports symbolic links 42/20542/7
Robin Rosenberg [Sun, 12 Jan 2014 00:34:58 +0000 (01:34 +0100)]
Dynamically detect if Windows supports symbolic links

To get symlink support you typically need to run as administrator.

Change-Id: I394ea75bc2f250c62f860e537a0af9e6380b3b38
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoAdd symlink support to JGit 79/9379/38
Robin Rosenberg [Fri, 4 Jan 2013 23:34:03 +0000 (00:34 +0100)]
Add symlink support to JGit

The change includes comparing symbolic links between disk and index,
adding symbolic links to the index, creating/modifying links on
checkout. The behavior is controlled by the core.symlinks setting, just
as C Git does. When a new repository is created core.symlinks will be
set depending on the capabilities of the operating system and Java
runtime.

If core.symlinks is set to true, the assumption is that symlinks are
supported, which may result in runtime errors if this turns out not to
be the case.

Measuring the cost of jgit status on a repository with ~70000 files,
of which ~30000 are tracked reveals a penalty of about 10% for using
the Java7 (really NIO2) support module.

Bug: 354367
Change-Id: I12f0fdd9d26212324a586896ef7eb1f6ff89c39c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoUse the new FS.exists method in commonly occuring places 34/10134/18
Robin Rosenberg [Mon, 4 Feb 2013 00:11:29 +0000 (01:11 +0100)]
Use the new FS.exists method in commonly occuring places

Allegedly this should improve performance, but I could not see it.

Change-Id: Id2057cb2cfcb46e94ff954483ce23f9c4a7edc5e

10 years agoFix deprecated WTI#isModified 52/21652/2
Robin Rosenberg [Thu, 6 Feb 2014 22:03:25 +0000 (23:03 +0100)]
Fix deprecated WTI#isModified

We should really pass the forceContentCheck parameter to
the real method.

Change-Id: I9ea439cf6340a18d0e931edde3b9e3486cafde93
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoFailing to delete a directory with untracked content is actually ok 93/21493/3
Robin Rosenberg [Tue, 4 Feb 2014 00:00:41 +0000 (01:00 +0100)]
Failing to delete a directory with untracked content is actually ok

We had a test, but it was wrong.

Bug: 424630
Change-Id: I926e0954c8623a323a50fe8be3ebe5e0ac6944c8
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoBan dangerous ref names in Windows 76/20176/5
Robin Rosenberg [Fri, 27 Dec 2013 15:31:32 +0000 (16:31 +0100)]
Ban dangerous ref names in Windows

Bug: 423551
Change-Id: I3e71ef1b4a8181f46d2902c9169859f150cd6ad0
Also-By: Robin Stocker <robin@nibor.org>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoMerge "Reset internal state canonical length in WorkingTreeIterator when moving"
Matthias Sohn [Tue, 4 Feb 2014 08:03:27 +0000 (03:03 -0500)]
Merge "Reset internal state canonical length in WorkingTreeIterator when moving"

10 years agoMerge "Fix MissingObjectException race in ObjectDirectory"
Shawn Pearce [Mon, 3 Feb 2014 23:05:39 +0000 (18:05 -0500)]
Merge "Fix MissingObjectException race in ObjectDirectory"

10 years agoFix MissingObjectException race in ObjectDirectory 62/21362/2
Shawn Pearce [Fri, 31 Jan 2014 00:25:49 +0000 (16:25 -0800)]
Fix MissingObjectException race in ObjectDirectory

Johannes Carlsson identified a race condition[1] that can lead to
spurious MissingObjectExceptions at read time. If two threads are
active inside of ObjectDirectory looking for a packed object and the
packList is currently the empty NO_PACKS list, thread A will find
no object and eventually consider tryAgain1(). If thread A is put
to sleep and this point and thread B also does not find the object,
loads the packs, when thread A wakes up its tryAgain1 would return
false and the thread never considers the packs.

Rework the internal API of ObjectDirectory to keep a handle on the
exact PackList that was iterated by thread A, allowing it to always
retry walking through the packs if the new PackList is different.

This had some ripple effect into the CachedObjectDirectory and
the shared FileObjectDatabase interface. The new code should be
slightly easier to follow, especially from the perspective of the
CachedObjectDirectory trying to minimize the number of open system
calls it makes to files matching "$GIT_DIR/objects/??/?x{38}".

[1] http://dev.eclipse.org/mhonarc/lists/jgit-dev/msg02401.html

Change-Id: I9a1c9d6ad6cb38404b7b9178167b714077561353

10 years agoReset internal state canonical length in WorkingTreeIterator when moving 32/21432/4
Robin Rosenberg [Sun, 2 Feb 2014 22:26:34 +0000 (23:26 +0100)]
Reset internal state canonical length in WorkingTreeIterator when moving

Bug: 426514
Change-Id: Ifb75a4fa12291aeeece3dda129a65f0c1fd5e0eb
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoFix for core.autocrlf=input resulting in modified file 73/20173/5
Robin Rosenberg [Thu, 26 Dec 2013 00:22:04 +0000 (01:22 +0100)]
Fix for core.autocrlf=input resulting in modified file

This version does not attempt to unsmudge, unlike the first attempt
in Idafad150553df14827eccfde2e3b95760e16a8b6.

Bug: 372834
Change-Id: I9300e735cb16d6208e1df963abb1ff69f688155d
Also-by: Robin Stocker <robin@nibor.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Signed-off-by: Robin Stocker <robin@nibor.org>
10 years agoAdd a missing since tag 32/21332/1
Christian Halstrick [Thu, 30 Jan 2014 14:23:56 +0000 (15:23 +0100)]
Add a missing since tag

Otherwise you get errors if you want to edit JGit in Eclipse

Change-Id: I840d4388f159e2db27845a17030b511fc5708f43

10 years agoMerge "Fix serving fetch of existing shallow client"
Shawn Pearce [Wed, 29 Jan 2014 19:56:20 +0000 (14:56 -0500)]
Merge "Fix serving fetch of existing shallow client"

10 years agoFix serving fetch of existing shallow client 27/21227/2
Shawn Pearce [Wed, 29 Jan 2014 00:29:15 +0000 (16:29 -0800)]
Fix serving fetch of existing shallow client

In certain cases a JGit server updating an existing shallow client
selected a common ancestor that was behind the shallow edge of
the client. This allowed the server to assume the client had some
objects it did not have and allowed creation of pack deltas the
client could never inflate.

Any commit the client has advertised as shallow must be treated
by UploadPack server as though it has no parents. With no parents
the walker cannot visit graph history the client does not have,
and PackWriter cannot consider delta base candidates the client
is lacking.

Change-Id: I4922b9354df9f490966a586fb693762e897345a2

10 years agoUpdate Kepler target platform to use Kepler SR2 orbit R-build 73/21073/1
Matthias Sohn [Fri, 24 Jan 2014 21:30:28 +0000 (22:30 +0100)]
Update Kepler target platform to use Kepler SR2 orbit R-build

Change-Id: I3c215b8bbb6497b59d20c9fe7684a0c3522636e8
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoAdd missing @since tags 99/20799/2
Matthias Sohn [Mon, 20 Jan 2014 08:28:06 +0000 (09:28 +0100)]
Add missing @since tags

Change-Id: I16d82499d7d000096de6bd4bd08e406073557162
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoUpdate API version to check changes against to 3.2.0.201312181205-r 98/20798/2
Matthias Sohn [Mon, 20 Jan 2014 08:27:51 +0000 (09:27 +0100)]
Update API version to check changes against to 3.2.0.201312181205-r

Change-Id: Ifb0a87a2b268a8bf3dc11310bfd6af18e242693c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoUpdate Luna target platform to use Luna M5 orbit repository 96/20796/1
Matthias Sohn [Mon, 20 Jan 2014 08:11:53 +0000 (09:11 +0100)]
Update Luna target platform to use Luna M5 orbit repository

See http://dev.eclipse.org/mhonarc/lists/orbit-dev/msg03647.html

Change-Id: Id10cd2e0b1aaba181b68f6ac30e0fc64fb714481
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoDo not report ignored directories as untracked 41/11141/2
Matthias Sohn [Thu, 28 Feb 2013 22:47:44 +0000 (23:47 +0100)]
Do not report ignored directories as untracked

Change-Id: I7e3f6b9fb1ac4b99d2cc9a78c63aad86f4fa5744
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoAdd git checkout --orphan implementation 95/20095/5
SATO taichi [Fri, 17 Jan 2014 05:57:39 +0000 (14:57 +0900)]
Add git checkout --orphan implementation

Change-Id: I7bb583674641efed210d3cd5b86af27d7bb48e97
Signed-off-by: SATO taichi <ryushi@gmail.com>
10 years agoFix fast forward rebase with rebase.autostash=true 49/20649/1
Stefan Lay [Wed, 15 Jan 2014 12:23:49 +0000 (13:23 +0100)]
Fix fast forward rebase with rebase.autostash=true

The folder .git/rebase-merge was not removed in this case. The
repository was then still in rebase state, but neither abort nor
continue worked.

Bug: 425742
Change-Id: I43cea6c9e5f3cef9d6b15643722fddecb40632d9

10 years agoUpdate target platforms to use latest orbit build 35/20635/1
Matthias Sohn [Tue, 14 Jan 2014 23:22:43 +0000 (00:22 +0100)]
Update target platforms to use latest orbit build

- use latest I-build for Luna
- use latest M-build for Kepler

Change-Id: I5b85306058877b19eae4cf5a820fe50cdd200c1c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoUpdate com.jcraft.jsch to 0.1.50 in Kepler target platform 22/20622/1
Matthias Sohn [Tue, 14 Jan 2014 14:54:06 +0000 (15:54 +0100)]
Update com.jcraft.jsch to 0.1.50 in Kepler target platform

Bug: 425660
Change-Id: I758b34d0486a88036da8327da6ef43385c62fd46
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoUpdate commons-compress to 1.6 72/17072/2
Jonathan Nieder [Tue, 14 Jan 2014 14:43:20 +0000 (15:43 +0100)]
Update commons-compress to 1.6

Includes various fixes, including
  o Writing TAR PAX headers failed if the generated entry name ended
    with a "/".
    Issue: COMPRESS-203.
which has been happening in the wild (java.io.IOException: request to
write '120' bytes exceeds size in header of '0' bytes for entry
'./PaxHeaders.X/hostsidetests/appsecurity/test-apps/AppAccessData/[...]/').

TODO: update orbit repository URL when new Orbit R-build is available,
see bug 425660

Change-Id: I92a87543a6ace9a06a70a29534399608cee6adb1
Signed-off-by: Jonathan Nieder <jrn@google.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoAdd setContains to ListBranchCommand (branch --contains) 19/20619/1
Robin Stocker [Tue, 14 Jan 2014 16:38:40 +0000 (17:38 +0100)]
Add setContains to ListBranchCommand (branch --contains)

To correspond to the behavior of "git branch", also return HEAD in case
it is detached.

Bug: 425678
Change-Id: Ie615731434d70b99bd18c7a02e832c0a2c3ceef3
Signed-off-by: Robin Stocker <robin@nibor.org>
10 years agofix link to EWAHCompressedBitmap in javadoc of SimpleDataInput/Output 99/20599/2
Tomasz Zarna [Tue, 14 Jan 2014 08:46:40 +0000 (09:46 +0100)]
fix link to EWAHCompressedBitmap in javadoc of SimpleDataInput/Output

Change-Id: Iaa07bb23f163b75e222bc6a5ce3acc91ffef435e
Signed-off-by: Tomasz Zarna <tomasz.zarna@tasktop.com>
10 years agoUpgrade javaewah to version 0.7.9 50/19450/5
Colby Ranger [Fri, 6 Dec 2013 17:21:17 +0000 (09:21 -0800)]
Upgrade javaewah to version 0.7.9

Package was renamed, so I had to update the imports. Also, I verified
bitmap serialization was still compatible.

Change-Id: I161ad3875b963b56001beab477ef8d072accee4f

10 years agoTag som non-localizable strings with NON-NLS 74/20174/2
Robin Rosenberg [Thu, 26 Dec 2013 11:30:38 +0000 (12:30 +0100)]
Tag som non-localizable strings with NON-NLS

Change-Id: I6882c98c2785f38241a81ba5b93892aab79690a5

10 years agoAdd missing package import for org.eclipse.jgit.archive 17/20317/1
Matthias Sohn [Tue, 7 Jan 2014 08:20:08 +0000 (09:20 +0100)]
Add missing package import for org.eclipse.jgit.archive

The archive bundle needs access to the nls package since 2ecc27db.

Change-Id: I76882e1f270296c5ce8e220e1946c4a8ddb6fdf5
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoRemove unused import from ArchiveTest 16/20316/1
Matthias Sohn [Tue, 7 Jan 2014 08:17:05 +0000 (09:17 +0100)]
Remove unused import from ArchiveTest

This unnecessary import was introduced by 2ecc27d.

Change-Id: I5cb415de7e33428d9f95dfbe1e214ef24be9dad9
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoSuppport the GIT_CONFIG_NOSYSTEM environment variable 02/20302/1
Robin Rosenberg [Mon, 6 Jan 2014 17:42:15 +0000 (18:42 +0100)]
Suppport the GIT_CONFIG_NOSYSTEM environment variable

Change-Id: If3cc05931683d396b5ae2ea8952adceeb9a82ab9

10 years agoMerge "archive: Use an empty directory for submodules"
Dave Borowitz [Fri, 27 Dec 2013 17:30:07 +0000 (12:30 -0500)]
Merge "archive: Use an empty directory for submodules"

10 years agoMerge "archive: Include entries for directories"
Dave Borowitz [Fri, 27 Dec 2013 17:29:37 +0000 (12:29 -0500)]
Merge "archive: Include entries for directories"

10 years agoarchive: Use an empty directory for submodules 49/17949/7
Jonathan Nieder [Sat, 2 Nov 2013 03:28:58 +0000 (20:28 -0700)]
archive: Use an empty directory for submodules

When encountering a submodule entry, "jgit archive" tries to write its
content verbatim as an entry to the archive, which fails with a
JGitInternalException wrapping a MissingObjectException because the
submodule repository commits are typically not part of the
superproject.

When a subproject is available (for example because it has been
checked out as a subdirectory of a superproject worktree), it would be
nice to recurse into it and make one archive recording the state of
the entire project.  Unfortunately sometimes the subproject is not
available or it can be hard to find (e.g., it can be on another
server).  Even when some subprojects are available, "jgit archive"
should not produce different output for the same tree depending on
which subprojects it has easy access to, so there is no obvious good
default behavior that recurses without relying on access to all
subprojects.

Instead, replace each submodule entry with a placeholder empty
directory.  "git archive" does the same.

Change-Id: I1295086037b77fc948b3f93c21d47341e25483e5
Signed-off-by: Jonathan Nieder <jrn@google.com>
10 years agoarchive: Include entries for directories 66/20166/3
Jonathan Nieder [Fri, 27 Dec 2013 16:55:39 +0000 (08:55 -0800)]
archive: Include entries for directories

Entries for directories are optional and mostly wasted space in most
archive formats (except as a place to hang ownership and filesystem
permissions), but "git archive" includes them.  Follow suit.

This will make it easier in a later change to include empty
directories as placeholders for missing submodules.

Change-Id: I1810c686bcc9eb4d73498e4d3e763e18787b088a
Signed-off-by: Jonathan Nieder <jrn@google.com>
10 years ago[CLI] Add option --millis / -m to debug-show-dir-cache command 13/20113/2
Matthias Sohn [Fri, 20 Dec 2013 12:35:59 +0000 (13:35 +0100)]
[CLI] Add option --millis / -m to debug-show-dir-cache command

This is useful when comparing mtime displayed by
    $ jgit debug-show-dir-cache -m
with mtime displayed by
    $ git ls-files --debug
or
    $ stat "%m"

Change-Id: Id133ebe6f6093a56a6a6645e1c5bb18752fb2fd0
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoMerge branch 'stable-3.2' 87/20087/1
Matthias Sohn [Thu, 19 Dec 2013 14:46:08 +0000 (15:46 +0100)]
Merge branch 'stable-3.2'

* stable-3.2:
  Prepare post 3.2.0 builds
  JGit v3.2.0.201312181205-r
  Revert "Fix for core.autocrlf=input resulting in modified file..."
  Fix for core.autocrlf=input resulting in modified file and unsmudge

Change-Id: I6650642c3511f5a41d673e561fec8204208d428d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoPrepare post 3.2.0 builds 09/20009/1 stable-3.2
Matthias Sohn [Wed, 18 Dec 2013 20:16:13 +0000 (21:16 +0100)]
Prepare post 3.2.0 builds

Change-Id: Ie2bfdee0c492e3d61d92acb04c5bef641f5f132f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoJGit v3.2.0.201312181205-r 97/19997/1 v3.2.0.201312181205-r
Matthias Sohn [Wed, 18 Dec 2013 17:05:20 +0000 (18:05 +0100)]
JGit v3.2.0.201312181205-r

Change-Id: Id00a8baf7d3ffefb210f03cd99f69d55411166fe
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
10 years agoRevert "Fix for core.autocrlf=input resulting in modified file..." 77/19977/1
Matthias Sohn [Wed, 18 Dec 2013 14:30:53 +0000 (15:30 +0100)]
Revert "Fix for core.autocrlf=input resulting in modified file..."

This reverts commit 1def0a1257d32bce08e751242733cda3b2036cb8.

We found this fix uncovers problems with unsmudged DirCacheEntry's. This
surfaced because egit's ui test CreatePatchActionTest failed since jgit
computes a wrong status. JGit doesn't detect modified content in now
unsmudged entries. Hence revert this change until these problems are
fixed.

Change-Id: Ia04277ce316d35fc5b0d82c93d2078b856af24bb
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>