Commit Graph

2793 Commits

Author SHA1 Message Date
Matthias Sohn 5a2a2222ef Prepare post 3.1.0 RC1 builds
Change-Id: I060f2082ccd0c91905b6b29a49cc633a0b51a1f2
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-09-27 15:54:40 +02:00
Matthias Sohn 6f0681eb9f JGit v3.1.0.201309270735-rc1
Change-Id: I48202dd461110da25f9bc159c938311fff0669e0
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-09-27 13:34:51 +02:00
Robin Rosenberg a065a06c2a Attempt to fix graph layout when new heads are introduced
Sometime the new commit is no allocated onto a new lane leading to
the commit being drawn on the wrong branch and something that looks
like a merge.

The drawback is that this also changes existing valid graphs.

Bug: 368927
Change-Id: Ic8a8247c8a53be802c1be83850ed766b902ca646
2013-09-26 14:06:39 +02:00
Matthias Sohn b4f07df357 Prepare re-signing pgm's ueberjar to avoid SecurityException
Since we now sign all build artifacts immediately after creating them
we need to re-sign the ueberjar created for jgit command line tool
because the signatures of the individual jars are invalidated when
repacking them into the ueberjar. Hence we need to exclude the
signatures of the individual jars when using maven-shade-plugin to
create the ueberjar.

Also install the shaded plugin into maven repository and exclude osgi
framework sources which were included unintentionally.

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

Change-Id: Ia302e68a4b2a9399cb18025274574e31d3d3e407
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-09-24 11:25:55 +02:00
Robin Stocker aa4bbc67b3 Use full branch name when getting ref in BranchTrackingStatus
In case there is both a tag and branch called "foo", the tag is returned
if calling getRef with the short name. By using refs/heads/foo, the
branch is returned.

Bug: 417158
Change-Id: I86b4f83955586bb24774fd621f5012499cf67909
Signed-off-by: Robin Stocker <robin@nibor.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-09-20 14:48:55 +02:00
Colby Ranger 570bba5e7a Ignore bitmap indexes that do not match the pack checksum
If `git gc` creates a new pack with the same file name, the
pack checksum may not match that in the .bitmap. Fix the PackFile
implementaion to silently ignore invalid bitmap indexes.

Fixes Issue https://code.google.com/p/gerrit/issues/detail?id=2131

Change-Id: I378673c00de32385ba90f4b639cb812f9574a216
2013-09-19 14:53:01 -07:00
Matthias Sohn 801aac579e Merge branch 'stable-3.0'
* stable-3.0:
  JGit v3.0.3.201309161630-r
  Add org.eclipse.jgit.java7.source to jgit source feature

Change-Id: I738afcfbc78ea1ac56d0d0ab7d4f7717167dd8dd
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-09-17 15:08:55 +02:00
Matthias Sohn 85fae93539 JGit v3.0.3.201309161630-r
Change-Id: I73ff609ba681500394b5919f62cff9ec24a52756
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-09-16 22:40:52 +02:00
Colby Ranger 7dc6c553c0 Remove unneeded packs when compacting with no new objects
Previously, the DfsPackCompactor exited without pruning the existing
packs, when no new packs were created.

Change-Id: I5e3b6f8c789706c7a982e6ae93cf7c3d4346797c
2013-09-16 11:56:02 -07:00
Matthias Sohn 6d9019867d Add org.eclipse.jgit.java7.source to jgit source feature
Change-Id: Ifd9153f77c246a67d5d15734667dc2360718a390
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-09-16 11:19:43 +02:00
Robin Stocker 02bd26e5a6 ResetCommand: Allow reset on unborn branch when ref not specified
In C Git 1.8.2, "git reset" now also works on an unborn branch (no HEAD
yet) if no explicit ref was specified. In that case, it is treated as a
reset to an empty tree.

This can be useful for callers because "unborn branch" no longer has to
be special-cased to "git rm --cached".

Bug: 414870
Change-Id: Ied750116f767518ae4d48823cf00752b049a8477
Signed-off-by: Robin Stocker <robin@nibor.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-09-13 15:13:12 +02:00
Matthias Sohn 4b8a848a47 Merge branch 'stable-3.0'
* stable-3.0:
  Prepare post 3.0.2 builds
  JGit v3.0.2.201311090911-r

Change-Id: I99a7d1072285646f7fcd4169225c1fd249ad5e37
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-09-11 23:30:05 +02:00
Matthias Sohn 3af38b4fee Prepare post 3.0.2 builds
Change-Id: Ie1bd951a2cb35d069c94dab4a62507115913764f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-09-11 16:54:32 +02:00
Matthias Sohn da3041ae73 JGit v3.0.2.201311090911-r
Change-Id: Ifaae2e3e2f1bb0504bf9e6d59983086ac19a540b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-09-11 15:15:00 +02:00
Robin Stocker 52ab578cd7 Don't treat "/" as valid ignore pattern
This matches the behavior of C Git.

Bug: 415767
Change-Id: Ifa6500f3f6a033da40c48287630b77c47b15f4a0
Signed-off-by: Robin Stocker <robin@nibor.org>
2013-09-09 17:05:17 -04:00
Matthias Sohn e10dd22749 Merge "Add missing usage texts for JGit commandline commands" 2013-09-09 17:04:58 -04:00
Matthias Sohn 01e793a3ff Add missing usage texts for JGit commandline commands
Also update help text for the merge command now supporting recursive
strategy as the default merge strategy.

Change-Id: I07886fe875c407e2244f562c003bb9d04f398026
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-09-09 22:54:52 +02:00
Matthias Sohn e243988e9e Add missing dependency for testing ArchiveCommand with xz compression
Without this dependency the ArchiveTest.testTxzExtension() fails with a
ClassNotFoundException if it is started from Eclipse.

Change-Id: Ief2fceaaffab7641ba63ace4577462fa3bbf1c13
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-09-08 23:11:03 +02:00
Shawn Pearce c2a9f9e742 Merge "Remove unnecessary inflate stride in DfsBlock" 2013-09-04 19:13:55 -04:00
Shawn Pearce aa8d5ac26c Remove unnecessary inflate stride in DfsBlock
OpenJDK 7 does not benefit from using an inflate stride on the input
array. The implementation of java.util.zip.Inflater supplies the
entire input byte[] to libz, with no regards for the bounds supplied.
Slicing at 512 byte increments in DfsBlock no longer has any benefit.

In OpenJDK 6 the native portion of Inflater used GetByteArrayRegion
to obtain a copy of the input buffer for libz. In this use case
supplying a small stride made sense, it avoided allocating space
for and copying data past the end of the object's compressed stream.

In OpenJDK 7 the native code uses GetPrimitiveArrayCritical,
which tries to avoid copying by freezing Java garbage collection
and accessing the byte[] contents in place. On OpenJDK 7 derived
JVMs it is likely more efficient to supply the entire DfsBlock.

Since OpenJDK 5 and 6 are deprecated and replaced by OpenJDK 7
it is reasonable to suggest any consumers running JGit with DFS
support use an OpenJDK 7 derived JVM. However, JGit still targets
local filesystem support on Java 5, so it is still not reasonble to
apply this same simplification to the internal.storage.file package.

See: JDK-6751338 (http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6751338)
Change-Id: Ib248b6d383da5c8aa887d9c355a0df6f3e2247a5
2013-09-04 14:54:50 -07:00
Matthias Sohn ff09a3633d Merge branch 'stable-3.0'
* stable-3.0:
  Prepare post 3.0.2-rc2 builds
  JGit v3.0.2.201309041250-rc2
  Uncomment eclipse-jar-signer plugin
  Update build to use CBI jarsigner plugin
  Update maven plugins
  Update to Orbit Kepler SR1 release R20130827064939

Change-Id: Iaa8bba21c300dd1de2b91a77cddf6727fbc66340
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-09-04 22:45:53 +02:00
Matthias Sohn 4eefa881b3 Prepare post 3.0.2-rc2 builds
Change-Id: I0e4020326c6443ba7157c18b345160cf9e1e88a7
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-09-04 19:34:56 +02:00
Matthias Sohn 7c37177952 JGit v3.0.2.201309041250-rc2
Change-Id: Ie18ced75f573f140969af2a7d9edb45c76523715
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-09-04 18:55:13 +02:00
Matthias Sohn eed58242df Uncomment eclipse-jar-signer plugin
This was commented out by mistake.

Change-Id: Ia1f6518ab7c7466d11710225f815b755fbf4d387
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-09-04 17:05:33 +02:00
Matthias Sohn b97a35d7cf Update build to use CBI jarsigner plugin
The dash signing plugin has been retired hence we need to update our
build to use the CBI jarsigner plugin for signing build results.

Pack test classes to enable signing them.

Also re-enable pack200 for bundle org.eclipse.jgit.

WORKAROUND: there is no easy way to run tests with maven-surefire-plugin
from signed test-jar so for a quick workaround we will have to add a
build step on Hudson so that we can run tests before signing:
- first step will do "clean, verify" to compile and run tests
- second step will do "install, deploy" with profile "eclipse-sign" and
  use -DskipTests=true to skip tests since they would hit a
  SecurityException when unsigned test classes are in same package as
  signed classes under test
- third step will do "clean, install, deploy" on packaging reactor to
  build features and p2 repository with profile "eclipse-sign" to sign
  and pack200 all bundles.

TODO: Tycho doesn't suport picking up pack200 artifacts via
pomDependencies hence we need to find a way to copy them manually and
use tycho-extra's tycho-p2-extras-plugin:publish-features-and-bundles
to generate the missing p2 metadata.

Change-Id: Iec2c5ab3027a3e3f9ecc0d2f99193385177d9025
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-09-04 16:06:02 +02:00
Matthias Sohn 3eb05bec89 Update maven plugins
Change-Id: Idda470ff355cc1ab559c3c64189e8b1df173dc55
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-08-30 23:10:39 +02:00
Matthias Sohn e9bab213f1 Update to Orbit Kepler SR1 release R20130827064939
Change-Id: I6849fc5cb81e8ac47ce1b2c5a74737b23c089fc1
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-08-28 01:10:02 +02:00
Robin Stocker f68ffb48eb LogCommand: Remove outdated TODO and improve docs
Change-Id: I368be12e7bdc3c711e9f474ead312006513764b7
Signed-off-by: Robin Stocker <robin@nibor.org>
2013-08-25 10:42:40 -04:00
Matthias Sohn c0fc5dc504 Merge branch 'stable-3.0'
* stable-3.0:
  Update reflog like C Git during rebase (non-interactive)
  Make sure checkout is not deleting folders outside the workingtree
  Update to Jetty 7.6.11.v20130520
  Fix bugs in TreeWalk#isPathSuffix used by PathSuffixFilter
  Refactor PathSuffixFilterTest to remove duplication
  Check parentFile is not null
  Update HEAD in cherry-picking several commits
  Fix HTTP response processing for WWW-Authenticate headers
  Don't skip want validation when the client sends no haves
  Fix tests for OS X when the tmpdir is the default /tmp
  Fix running maven http tests on OS X
  Recognize CRLF when parsing the short message of a commit or tag
  Update build to use Tycho 0.18
  Add jgit target platform to define dependencies more precisely
  Prepare 3.0.2-SNAPSHOT builds

Change-Id: Icef0cd0cce9bbccf2b2cbb3471a3f4ce0655e22c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-08-22 22:50:43 +02:00
Robin Rosenberg 99d981ce35 Update reflog like C Git during rebase (non-interactive)
Bug: 346350
Change-Id: I119766a00bc52a810c51cffaa19207cb8555ca22
Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
2013-08-21 14:44:48 +02:00
Christian Halstrick bd57789735 Make sure checkout is not deleting folders outside the workingtree
There was a chance that jgit deletes symbolic links which point to the
folder on top of the working tree. Make sure not to touch these
resources.

Thanks to Cedric Darloy who reported this bug on
http://www.eclipse.org/forums/index.php/m/776910/#msg_776910 and to
Ondrej Vrabec who reported bug 412489.

Bug: 412489
Change-Id: I81735ba0394ef6794e9b2b8bdd8bd7e8b9c6460f
Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
Signed-off-by: Robin Stocker <robin@nibor.org>
2013-08-21 14:44:47 +02:00
Matthias Sohn ab4ade41c4 Update to Jetty 7.6.11.v20130520
Change-Id: I76d32444c9cf9f086a013e410a88d37a359272fd
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-08-21 14:44:47 +02:00
Robin Stocker c128100800 Fix bugs in TreeWalk#isPathSuffix used by PathSuffixFilter
* It didn't check the first character in the pattern due to a off-by-one
  error. Spotted by James Roper.
* It returned true even when pattern was longer than current path, e.g.
  it returned that ".txt" is suffix of "txt".

Bug: 411999
Change-Id: I9fbcd68a11fb57cc49956b70c387a47271a0424f
Signed-off-by: Robin Stocker <robin@nibor.org>
2013-08-21 14:44:47 +02:00
Robin Stocker c222b18808 Refactor PathSuffixFilterTest to remove duplication
Makes it possible to add new test cases without copying lots of lines.

Change-Id: I66db3bc0cbd18fb5a07748905c60384b86b1c162
Signed-off-by: Robin Stocker <robin@nibor.org>
2013-08-21 14:44:47 +02:00
Hiroshi Tomita 781b0b5735 Check parentFile is not null
parentFile becomes null when f is relative path, such as ".".

This patch avoids NullPointerException in such case.

Change-Id: I4752674b1daab6eedd7c3650c7749462810eaffd
Signed-off-by: Hiroshi Tomita <tomykaira@gmail.com>
2013-08-21 14:44:47 +02:00
Hiroshi Tomita 27c1c51079 Update HEAD in cherry-picking several commits
Without update, index is wrongly detected to be dirty
when picking the second commit.

Change-Id: Idf47ecb33e8bd38340d760806d629f67be92d2d5
Signed-off-by: Hiroshi Tomita <tomykaira@gmail.com>
Bug: 411963
2013-08-21 14:44:47 +02:00
Alex Rukhlin 81db591034 Fix HTTP response processing for WWW-Authenticate headers
The original code was able to process only one WWW-Authenticate
header in an HTTP response, and if this header was not one of
two expected, authentication failed regardless of that there
could be other headers in the response.

All WWW-Authenticate headers in an HTTP response have to be
browsed to find one of supported, i.e. Basic or Digest.
By that if both are present, the Digest one should be used
as more preferable.

Bug: 357719
Change-Id: Icf601a41fec63f7d40308f3c85aaa4f71a7c095b
Signed-off-by: Alex Rukhlin <arukhlin@microsoft.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-08-21 14:44:47 +02:00
Dave Borowitz bbea37a9e3 Don't skip want validation when the client sends no haves
Change-Id: I5e80b3befca5cf1dcb06075862d6d48e6491cc0f
2013-08-21 14:44:46 +02:00
Robin Rosenberg 8a7f4864d8 Fix tests for OS X when the tmpdir is the default /tmp
/tmp is a symbolic link and some tests break when the path
gets canonicalized by JGit or Jetty. Allow Jetty to serve
symlinks by setting init parameter "aliases" to true [1].

[1] http://wiki.eclipse.org/Jetty/Howto/How_to_serve_symbolically_linked_files

Change-Id: I45359a40435e8a33def6e0bb6784b4d8637793ac
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-08-21 14:44:46 +02:00
Robin Rosenberg 423f7227cd Fix running maven http tests on OS X
In 36144e12d8 tests were changed to use the system tmp directory as defined
by java.io.tmpdir, which was then overridden in the pom files to usea custom
directory that made som tests work, but not all.

Change-Id: I2fa04878f8830ad9c9b32a6f3fe8d2e2d66fe411
2013-08-21 14:44:46 +02:00
Robin Rosenberg ec2202f563 Recognize CRLF when parsing the short message of a commit or tag
Bug: 400707
Change-Id: I9b09bb88528af465018fc0278f5441f7e6b75986
2013-08-21 14:44:46 +02:00
Matthias Sohn 4b41b68bc2 Update build to use Tycho 0.18
Change-Id: I66ffb2b6416dbbd5da11ad789dd58060b7ab09f2
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-08-21 14:44:46 +02:00
Matthias Sohn f94b258717 Add jgit target platform to define dependencies more precisely
Avoid that the packaging build picks an older jgit version coming with
eclipse platform by using a target platform which allows to define the
dependencies more precisely.

Change-Id: I39bba3baa4517e2b5e5fe0de096e756f2904e3e9
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-08-21 14:44:30 +02:00
Matthias Sohn fdd1ac930e Prepare 3.0.2-SNAPSHOT builds
Change-Id: I3287609a90f068017cc62f4fd7738651e0663081
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-08-19 01:39:41 +02:00
Robin Stocker 9b26e4bffb Enable LsRemoteCommand to work without local repository
It's supported by C Git and can be useful.

Bug: 413388
Change-Id: I12c6c10e791cc09ee271d89eb8b8d32f53e385db
Signed-off-by: Robin Stocker <robin@nibor.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-08-13 00:04:37 +02:00
Robin Stocker 6fb8d2345b Add missing @since tag for replaceLineBreaksWithSpace
Change-Id: Ibd9d9ba609a2cd7707b985cdb07405dce0422aab
Signed-off-by: Robin Stocker <robin@nibor.org>
2013-08-12 21:34:50 +02:00
Matthias Sohn 7baeffc581 Allow the command line bundle to access internal jgit packages
Change-Id: Id1e11a21fdcbd8cb0f2f8c22e7ab253e8df65d2f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-08-11 00:51:42 +02:00
Robin Rosenberg c58405b0c3 Merge "Recognize CRLF when parsing the short message of a commit or tag" 2013-08-10 18:31:01 -04:00
Robin Rosenberg b6e5189c4e Merge "Added characters to be escaped in file name patterns" 2013-08-10 17:32:20 -04:00
Lars Vogel 594408e522 Add missing @since tags
Change-Id: I9754e2124c0fe6ad2dbde5597c3ed10f1c3efef5
Signed-off-by: Lars Vogel <Lars.Vogel@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-08-10 01:23:27 +02:00