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>
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>
Common practice when distributing tarballs is to prefix all entries
with a single directory name so when the tarball is extracted it all
falls neatly into a single directory. Add a setPrefix() method to
ArchiveCommand to support this.
Change-Id: I16b2832ef98c30977f6b77b646728b83d93c196f
Signed-off-by: Jonathan Nieder <jrn@google.com>
Add support for the machine-readable output format along with the
existing default long format.
Bug: 419968
Change-Id: I37fe5121b4c9dbae1106b1d18e9fdc134070a9dd
Signed-off-by: Kaloyan Raev <kaloyan.r@zend.com>
Change-Id: I49f92bf7cafc80404f0bd07d62ff4b25e4db6e7c
Signed-off-by: Axel Richard <axel.richard@obeo.fr>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
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>
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>
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
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>
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>
Allow filtering of the status. Only files which match given paths are
inspected and only their state is reported.
Change-Id: I3c4b1b46bf297cd4ebdb4997cfa14c8752a36411
Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
All bugs reported for gc have been fixed and it seems we reached a
stable implementation.
Change-Id: I78a96ee2103beb48325da0f6ee10b2498bdc0267
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
See change I08bed4275af9ec52aa4d7054067ac82f6a3c9781, where fixing such
warning lead to complaints.
If fixing is not wanted, disable it instead.
Change-Id: If31d4028fa1c6377a11e83ed5688b45701cec68b
If the --format option is not given and the output filename is,
then infer the format from that filename. Otherwise match
"git archive" by defaulting to tar (this is a change from the
existing "jgit archive" default behavior, which was to default to
zip).
Change-Id: I5806bc48a403d05e4cfc3c180b82b33ad7cfae7f
This makes the functionality of registering all formats from the
org.eclipse.jgit.archive package available in contexts where
FormatActivator cannot be built because the OSGi core framework is not
readily available to build against.
Change-Id: If8e3487e933783a7e12f8e1838cbfe0b5862ce80
Add a static start() method to FormatActivator to allow outside
classes such as the Archive subcommand of the jgit program to use it
without a BundleContext. This way, the list of formats only has to be
maintained in one place.
While at it, build a list of registered formats at start() time, so
stop() doesn't have to repeat the same list of formats.
Suggested-by: Shawn Pearce <spearce@spearce.org>
Change-Id: I55cb3095043568740880cc9e4f7cde05f49c363c
Make call() release all private resources so instead of using a
pattern like
ArchiveCommand cmd = git.archive();
try {
cmd.setTree(tree)
. ...
.call();
} finally {
cmd.release();
}
callers can just use git.archive().setTree(tree)....call() directly.
This involves pushing more work out of parameter setters and into
call() so the ObjectReader is not allocated and potentially leaked
before then.
Change-Id: I699f703c6302696e1cc276d7ab8ee597d82f2c5d