Commit Graph

2822 Commits

Author SHA1 Message Date
Tomasz Zarna 52ce448662 Add missing resources from source.. in build.properties
Change-Id: Ief9b84c07494bdb01ce16b4ae3353c5364cc6625
Signed-off-by: Tomasz Zarna <tomasz.zarna@tasktop.com>
2013-10-30 17:42:38 +01:00
Kaloyan Raev 40e8ba4186 CLI fetch command should support --tags
Bug: 419638
Change-Id: I1dc99fd38e678e091a1d141d741328f0dec1756a
Signed-off-by: Kaloyan Raev <kaloyan.r@zend.com>
Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
2013-10-26 17:25:23 -04:00
Rüdiger Herrmann 9b1c965446 Add missing JUnit dependency in MANFEST.MF
Bug: 419998
Change-Id: Ie49ad97cb86d51274251296cee559141bfdb9fc9
Signed-off-by: Rüdiger Herrmann <ruediger.herrmann@gmx.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-10-25 00:21:31 +02:00
Matthias Sohn 72c7618571 Add / fix @since tags
Change-Id: I1e5bea968b3c79df4f600b75fde5b547ebadde36
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-10-24 08:32:47 +02:00
Robin Stocker 09711a4bb9 Make sure SystemReader is reset after test is run
Otherwise the MockSystemReader from the test setup is active for other
tests.

Change-Id: I7caf693bd692d06936e29efd4dc4aabb48c1c39b
Signed-off-by: Robin Stocker <robin@nibor.org>
2013-10-22 00:37:56 +02:00
Robin Rosenberg 057321731e Merge "Add describe command to JGit command line interface" 2013-10-20 12:31:25 -04:00
Matthias Sohn a0cef63f6d Merge "Fix failed tests when the tmp directory is a symlink" 2013-10-19 18:14:46 -04:00
Robin Rosenberg 068e2df1ce Fix failed tests when the tmp directory is a symlink
On Mac OS X /tmp is by default a symbolic link.

Change-Id: I0913ee5ee8db5c5918a9e41abbbfe125b6c70783
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-10-20 00:13:58 +02:00
Robin Rosenberg c01a66deba Merge changes I5a5a2387,I04805ce2
* changes:
  Describe HEAD if no explicit target was set
  Allow to set target of DescribeCommand
2013-10-19 09:55:58 -04:00
Matthias Sohn 8de3512890 Scripts to publish jgit artifacts on Maven central
- you need an account on oss.sonatype.org and permissions for group id
  org.eclipse.jgit, see [1]
- install ruby [2] if necessary
- run download.rb to download the Maven artifacts from repo.eclipse.org
- then run deploy.rb to stage the artifacts on oss.sonatype.org
- follow [3] to close the staging repository which triggers some sanity
checks on Nexus
- ask community to test artifacts from staging repository
- if tests are ok release the staging repository as described in [4]

[1] https://issues.sonatype.org/browse/OSSRH-2758
[2] https://www.ruby-lang.org/en/downloads/
[3]
https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide#SonatypeOSSMavenRepositoryUsageGuide-7b.StageExistingArtifacts
[4]
https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide#SonatypeOSSMavenRepositoryUsageGuide-8a.ReleaseIt

Change-Id: I830f2392b9234e585b01dbb4a5a369edd88796a2
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-10-17 23:15:46 +02:00
Kaloyan Raev 46c839abd5 CLI version command falls back to Bundle-Version
If the version command cannot read the Implementation-Version of the
containing JAR fall back to read the Bundle-Version header in
MANIFEST.MF. This makes the command working also from the
org.eclipse.jgit.pgm bundle and during development in a host IDE.

Bug: 419087
Change-Id: I4269d1cbd9bf9fd8be6fb4463aecc1c434aa387b
Signed-off-by: Kaloyan Raev <kaloyan.r@zend.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-10-12 22:45:27 +02:00
Matthias Sohn 401212de7a Add describe command to JGit command line interface
Change-Id: I1560fd2be417361b3d2df15a27618053031bd873
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-10-11 00:52:11 +02:00
Matthias Sohn b15c617d0f Describe HEAD if no explicit target was set
Change-Id: I5a5a238709df813ec07278bb3b4f9ea5c85c0883
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-10-11 00:12:44 +02:00
Matthias Sohn 3c2c8b47ff Allow to set target of DescribeCommand
Change-Id: I04805ce20cc203f5e491406c39b71e7017553b37
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-10-11 00:11:00 +02:00
Matthias Sohn f3d323e9fe List all supported formats in archive command's help
Change-Id: I4bd271cb348914642069239853488f4960444746
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-10-10 23:36:07 +02:00
Robin Stocker ec56d0d82a Merge "Add support for --version in JGit CLI" 2013-10-10 07:53:57 -04:00
Kaloyan Raev 4d2378f41b Add resources/ as source folder in build.properties
This allows correct export of org.eclipse.jgit.pgm via the PDE Export
wizard.

Bug: 419089
Change-Id: I98765208edd7df59e262001dd01ed2b43e4475a9
Signed-off-by: Kaloyan Raev <kaloyan.r@zend.com>
2013-10-10 00:49:58 +03:00
Kaloyan Raev 2c969ea00b Add support for --version in JGit CLI
Bug: 419000
Change-Id: I43f5267182ea69d1f9abbff33136e0491c629071
Signed-off-by: Kaloyan Raev <kaloyan.r@zend.com>
2013-10-09 20:37:03 +03:00
Colby Ranger 06ddee1c3f Fix ServiceMayNotContinueException constructors for Java 1.5
IOException did not add a (String, Throwable) constructor until 1.5.
Instead use the String super constructor and initCause to initialize
the exception.

Fixes bug 418889

Change-Id: Ide735ecfc7d04884981b79b57a4275863ce17006
2013-10-08 10:16:45 -07:00
Colby Ranger a27529c822 Add constructors that take Throwable to ServiceMayNotContinueException.
ServiceMayNotContinueException usually wraps an underlying exception.
Add convenience constructors that take Throwable. In the case a
string is not provided, the message defaults to "internal server error",
since it may be reported to the client.

Change-Id: I15dc20306826c352f69e88afb7ed6927c12b6c1f
2013-10-07 17:31:06 -04:00
Colby Ranger 5218f7b33a Propagate IOException where possible when getting refs.
Currently, Repository.getAllRefs() and Repository.getTags() silently
ignores an IOException and instead returns an empty map. Repository
is a public API and as such cannot be changed until the next major
revision change. Where possible, update the internal jgit APIs to
use the RefDatabase directly, since it propagates the error.

Change-Id: I4e4537d8bd0fa772f388262684c5c4ca1929dc4c
2013-10-07 11:32:54 -07:00
Matthias Sohn 7995d87713 Prepare 3.2.0-SNAPSHOT builds
Change-Id: Iac6cf7a5bb6146ee3fe38abe8020fc3fc4217584
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-10-03 18:21:31 +02:00
Matthias Sohn fdc80f7cad Merge branch 'stable-3.1'
* stable-3.1:
  Prepare post 3.1.0 builds
  JGit v3.1.0.201310021548-r
  Fix order of commits in rebase todo file header
  Prepare post 3.1.0 RC1 builds
  JGit v3.1.0.201309270735-rc1
  Attempt to fix graph layout when new heads are introduced
  Prepare re-signing pgm's ueberjar to avoid SecurityException
  Use full branch name when getting ref in BranchTrackingStatus

Change-Id: Ida30175d0c058048cbe4b563aae7f85cd008db29
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-10-03 17:39:33 +02:00
Matthias Sohn da6e87bc37 Prepare post 3.1.0 builds
Change-Id: I306a3d40c6ddb88a16d17f09a60e3d19b0716962
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-10-03 17:29:00 +02:00
Matthias Sohn 16ca725b35 JGit v3.1.0.201310021548-r
Change-Id: I2170b13047d5eab7565f47f9feb1680e03b1ba09
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-10-02 22:09:19 +02:00
Matthias Sohn 0be59ab033 Merge "Added the git-describe implementation" 2013-10-02 15:45:22 -04:00
Stefan Lay c6aba99668 Fix order of commits in rebase todo file header
Change-Id: I0e41d89bbd4fc01ad3b3d05a45ee60af853bfae7
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-09-29 22:17:44 +02:00
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
Kohsuke Kawaguchi f045a68a78 Added the git-describe implementation
CQ: 7609
Bug: 339246
Change-Id: I689bc0578ce3a430b9800ad84122e221c69829f4
Signed-off-by: Kohsuke Kawaguchi <kk@kohsuke.org>
Also-By: Robin Stocker<robin@nibor.org>
Also-By: Matthias Sohn <matthias.sohn@sap.com>
Also-By: Christian Halstrick <christian.halstrick@sap.com>
2013-09-27 12:37:36 +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
Jonathan Nieder 8a51c4453d Do not close ArchiveOutputStream on error
If we encounter an I/O error while writing an archive (for example due
to the reader of an HTTP stream closing the connection), the result is
an archive with unclosed entries, causing
TarArchiveOutputStream.finish() to throw IOException("This archives
contains unclosed entries"), hiding the IOException that caused the
early termination.

The unclosed entries are fine: the same exception that occured in the
first place will probably prevent closing the entries before finishing
this partial archive that should be discarded anyway.

It would be nicer to call TarArchiveOutputStream.finish and leave the
underlying OutputStream unclosed --- all callers close it already ---
but that would be a more invasive change so we hold off for now.

Change-Id: I328ced19aa8a1888e5353cdbb6106a85fd72d5d7
Signed-off-by: Jonathan Nieder <jrn@google.com>
2013-09-23 17:31:27 -07: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