]> source.dussan.org Git - jgit.git/log
jgit.git
14 years agoserver side: smart push over HTTP 46/46/11
Shawn O. Pearce [Wed, 6 Jan 2010 19:13:05 +0000 (11:13 -0800)]
server side: smart push over HTTP

Clients can request smart push support by examining the info/refs URL
with the service parameter set to the magic git-receive-pack string:

  GET /$GIT_DIR/info/refs?service=git-receive-pack HTTP/1.1

The response is formatted with the receive pack capabilities, using
the standard packet line formatter.  A special header block is put
in front of the standard receive-pack advertisement to let clients
know the service was recognized and is supported.

If the requested service is disabled an authorization status code is
returned, allowing the user agent to retry once they have obtained
credentials from a human, in case authentication is required by
the configured ReceivePackFactory implementation.

Change-Id: Ie4f6e0c7b68a68ec4b7cdd5072f91dd406210d4f
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agoSimple dumb HTTP server for Git 41/41/12
Shawn O. Pearce [Wed, 6 Jan 2010 20:26:54 +0000 (12:26 -0800)]
Simple dumb HTTP server for Git

This is a simple HTTP server that provides the minimum server side
support required for dumb (non-git aware) transport clients.

We produce the info/refs and objects/info/packs file on the fly
from the local repository state, but otherwise serve data as raw
files from the on-disk structure.

In the future we could better optimize the FileSender class and the
servlets that use it to take advantage of direct file to network
APIs in more advanced servlet containers like Jetty.

Our glue package borrows the idea of a micro embedded DSL from
Google Guice and uses it to configure a collection of Filters
and HttpServlets, all of which are matched against requests using
regular expressions.  If a subgroup exists in the pattern, it is
extracted and used for the path info component of the request.

Change-Id: Ia0f1a425d07d035e344ae54faf8aeb04763e7487
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agoExpose PacketLineOut for reuse outside of the transport package 45/45/9
Shawn O. Pearce [Wed, 7 Oct 2009 03:09:29 +0000 (20:09 -0700)]
Expose PacketLineOut for reuse outside of the transport package

Change-Id: Iaa331a476e28cf2880df5607de36bc9f67d041df
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agoExpose RefAdvertiser for reuse outside of the transport package 44/44/9
Shawn O. Pearce [Wed, 7 Oct 2009 02:23:33 +0000 (19:23 -0700)]
Expose RefAdvertiser for reuse outside of the transport package

By making this class and its methods public, and the actual writing
abstract, we can reuse this code for other formats like writing an
info/refs file for HTTP transports.

Change-Id: Id0e349c30a0f5a8c1527e0e7383b80243819d9c5
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agoTeach UploadPack how to use an RPC style interface 48/48/7
Shawn O. Pearce [Wed, 7 Oct 2009 07:10:51 +0000 (00:10 -0700)]
Teach UploadPack how to use an RPC style interface

If biDirectionalPipe is false UploadPack does not start out with
the advertisement but instead assumes it should read one block of
want/have lines, process that, and write the ACK/NAKs out.

This means it only is doing one read through the input followed by
one write to the output, which fits with the HTTP request processing
model, and any other type of RPC system.

Change-Id: Ia9f7c46ee556f996367180f15d2caa8572cdd59f
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agoTeach ReceivePack how to use an RPC style interface 43/43/7
Shawn O. Pearce [Wed, 7 Oct 2009 01:43:41 +0000 (18:43 -0700)]
Teach ReceivePack how to use an RPC style interface

If biDirectionalPipe is false ReceivePack does not start out with the
advertisement but instead assumes it should read the command set once,
process that, and write the status report out.  This means it only is
doing one read through the input followed by one write to the output,
which fits with the HTTP request processing model, and any other type
of RPC system... assuming that the payload for input can be a very big
entity like the command stream followed by the pack file.

Change-Id: I6f31f6537a3b7498803a8a54e10b0622105718c1
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agoRefactor TemporaryBuffer to support reuse in other contexts 52/152/5
Shawn O. Pearce [Fri, 27 Nov 2009 04:16:30 +0000 (20:16 -0800)]
Refactor TemporaryBuffer to support reuse in other contexts

Later we are going to add support for smart HTTP, which requires us to
buffer at least some of the request created by a client before we ship
it to the server.  For many requests, we can fit it completely into a
1 MiB buffer, but if it doesn't we can drop back to using the chunked
transfer encoding to send an unknown stream length.

Rather than recoding the block based memory buffer, we refactor the
local file overflow strategy into a subclass, allowing the HTTP client
code to replace this portion of the logic with its own approach to
start the chunked encoding request.

Change-Id: Iac61ea1017b14e0ad3c4425efc3d75718b71bb8e
Signed-off-by: Shawn O. Pearce <sop@google.com>
14 years agoImplement multi_ack_detailed protocol extension 51/151/5
Shawn O. Pearce [Wed, 4 Nov 2009 02:00:50 +0000 (18:00 -0800)]
Implement multi_ack_detailed protocol extension

The multi_ack_detailed extension breaks out the "ACK %s continue" status
code into "ACK %s common" and "ACK %s ready" states, making it easier to
discover which objects are truely common, and which objects are simply
on a chain the server doesn't care learning about.

Change-Id: Ie8e907424cfbbba84996ca205d49eacf339f9d04
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agoAbstract out utility functions for creating test commits 76/176/3
Shawn O. Pearce [Tue, 5 Jan 2010 19:44:52 +0000 (11:44 -0800)]
Abstract out utility functions for creating test commits

These routines create a fairly clean DSL for writing out the
structure of a repository in a test case.  Abstract them into
a helper class that we can reuse in other test environments.

Change-Id: I55cce3d557e1a28afe2fdf37b3a5b67e2651c9f1
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agoFix PersonIdent to always use SystemReader 83/183/2
Shawn O. Pearce [Wed, 6 Jan 2010 23:16:05 +0000 (15:16 -0800)]
Fix PersonIdent to always use SystemReader

Under unit tests we want the when and timezone to come from the
MockSystemReader and be stable.  We did this for the default
constructor based on the Repository, but failed to do it for the
name,emailAddress variant of the constructor.

Change-Id: I608ac7cf01673729303395e19b379b38fef136b3
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agoFix RefWriter creation of info/refs to omit HEAD 75/175/3
Shawn O. Pearce [Mon, 4 Jan 2010 23:00:45 +0000 (15:00 -0800)]
Fix RefWriter creation of info/refs to omit HEAD

We really mean to omit HEAD here, but botched the difference between
getOrigName and getName on the Ref object.  We tested on the wrong
value, picking up the target of the symbolic ref and therefore
included it twice.

Change-Id: If780c65166ccada2e63a4f42bbab752a56b16564
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agoMove TestRng to our JUnit helper package 77/177/3
Shawn O. Pearce [Wed, 6 Jan 2010 03:14:48 +0000 (19:14 -0800)]
Move TestRng to our JUnit helper package

Other test suites may find this useful, especially when trying
to defeat the pack file compression with random data files.

Change-Id: Ic00a4ac626af7a1c94d18ee99305e295b267b1a3
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agoCorrect spelling error in StringUtils javadoc 85/185/5
Shawn O. Pearce [Thu, 7 Jan 2010 16:02:40 +0000 (08:02 -0800)]
Correct spelling error in StringUtils javadoc

Change-Id: Idd98530d5f6fca4de8631aa865e4bcd6e6cf9306
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agoFinish removing Apache Felix maven-bundle-plugin 02/202/1
Shawn O. Pearce [Tue, 12 Jan 2010 19:41:35 +0000 (11:41 -0800)]
Finish removing Apache Felix maven-bundle-plugin

Since Robin reverted using the maven-bundle-plugin to produce the
OSGi manifest, there is no reason for us to reference it from our
build process anymore.

Also, when Robin reverted the to the Eclipse way of doing things,
we failed to update the ignore files to ignore our generated files
but not ignore our tracked .classpath.

Finally, we cannot delete the MANIFEST.MF file during a Maven build,
as this is once again a source file.

Change-Id: I53f77f2002cb4285f728968829560e835651e188
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agoFix merge for "Partial revert "Switch build to Apache Felix maven-bundle-plugin"" 01/201/2
Robin Rosenberg [Tue, 12 Jan 2010 19:40:57 +0000 (20:40 +0100)]
Fix merge for "Partial revert "Switch build to Apache Felix maven-bundle-plugin""

There was a missing dependency.

Change-Id: Ib7b9f05ee4c7c2bd7760ce44a7c2cd72759d514d
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
14 years agoMerge "Partial revert "Switch build to Apache Felix maven-bundle-plugin""
Robin Rosenberg [Tue, 12 Jan 2010 19:35:17 +0000 (14:35 -0500)]
Merge "Partial revert "Switch build to Apache Felix maven-bundle-plugin""

14 years agoPartial revert "Switch build to Apache Felix maven-bundle-plugin" 00/200/1
Robin Rosenberg [Sun, 10 Jan 2010 12:46:33 +0000 (13:46 +0100)]
Partial revert "Switch build to Apache Felix maven-bundle-plugin"

This restores the ability to build using just Eclipse without
strange procedures, extra plugins and it is again possible to
work on both JGit and EGit in the same Eclipse workspace with
ease.

Change-Id: I0af08127d507fbce186f428f1cdeff280f0ddcda
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
14 years agoRead core.worktree regardless of whether .git was discovered or not 70/170/2
Robin Rosenberg [Sat, 2 Jan 2010 16:19:29 +0000 (17:19 +0100)]
Read core.worktree regardless of whether .git was discovered or not

The C Git documentation stated that the core.worktree config was
not read when the .git directory was found implicitly (from the
working directory).

This was not true, and had not been so for a long time. The
documentation has been updated to document the existing behaviour.

Change-Id: If1e81b6a981b9d70e849f24872f01c110e9bc950
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agoExplicitly release resources used by java.util.zip.Deflater 84/184/2
Igor Fedorenko [Thu, 7 Jan 2010 02:18:44 +0000 (21:18 -0500)]
Explicitly release resources used by java.util.zip.Deflater

Deflater can use significant amount of native (i.e. C) heap
space. Failure to promptly release this memory results
in native memory leak in some cases, particularly severe for
VMs with large java max heap size. For example, running
Team->Commit in one of my EGit workspaces results in ~500M
java process size increase without any significant change
to amount of used java heap when JVM is started with -Xmx1024m.

Change-Id: I649679a8df5683ebedd9380d703513d31c625932
Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agoUse build timestamp as OSGi version qualifier for SNAPSHOT builds 82/182/3
Igor Fedorenko [Wed, 6 Jan 2010 23:51:39 +0000 (18:51 -0500)]
Use build timestamp as OSGi version qualifier for SNAPSHOT builds

Default maven-bundle-plugin behaviour results in use of the same
.SNAPSHOT OSGi bundle version qualifier for all snapshot builds.
This causes problems for eclipse update manager and other consumers
that rely on OSGi bundle metadata to select "newer" or "best
matching" version of jgit bundle.

To solve the problem, maven-bundle-plugin is configured to replace
.SNAPSHOT with build timestamp in format like 20100106-1234.

Change-Id: I0999c7bd68aa2ee74dffaed54a8dc4e1b67cf80d
Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agoRemove unnecessary semicolon in MergeChunk 81/181/1
Shawn O. Pearce [Wed, 6 Jan 2010 19:22:57 +0000 (11:22 -0800)]
Remove unnecessary semicolon in MergeChunk

Change-Id: I5526edca9816b90f5df2d7f14f24f11d3f5d2ead
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agoMerge branch 'cq-diff' 80/180/1
Shawn O. Pearce [Wed, 6 Jan 2010 17:53:45 +0000 (09:53 -0800)]
Merge branch 'cq-diff'

Per CQ 3559 "JGit - Eugene Myers O(ND) difference algorithm" we
have approval to check this into our master branch.

* cq-diff:
  Add file content merge algorithm
  Add performance tests for MyersDiff
  Add javadoc comments, remove unused code, shift comments to correct place
  Fixed MyersDiff to be able to handle more than 100k
  Fix some warnings regarding unnecessary imports and accessing static methods
  Add the "jgit diff" command
  Prepare RawText for diff-index and diff-files
  Add a test class for Myers' diff algorithm
  Add Myers' algorithm to generate diff scripts
  Add set to IntList

Conflicts:
org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java

Change-Id: Ia8e98d81ba1ab52f84d0258a40e6ef5eece9a5b1
CC: Christian Halstrick <christian.halstrick@sap.com>
14 years agoAdd file content merge algorithm 40/140/6
Christian Halstrick [Thu, 3 Dec 2009 15:36:14 +0000 (16:36 +0100)]
Add file content merge algorithm

Adds the file content merge alorithm and tests for merge to jgit.
The merge algorithm:

- Gets as input parameters the common base, the two new contents
  called "ours" and "theirs".

- Computes the Edits from base to ours and from base to theirs with
  the help of MyersDiff.

- Iterates over the edits.

- Independent edits from ours or from theirs will just be applied
  to the result.

- For conflicting edits we first harmonize the ranges of the edits
  so that in the end we have exactly two edits starting and ending
  at the same points in the common base. Then we write the two
  conclicting contents into the result stream.

Change-Id: I411862393e7bf416b6f33ca55ec5af608ff4663
Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
[sp: Fixed up two awkard comments in documentation.]
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agoFix code formatter style references 74/174/1
Shawn O. Pearce [Tue, 5 Jan 2010 19:30:58 +0000 (11:30 -0800)]
Fix code formatter style references

We call it "JGit Format", not "JGit".

Change-Id: Idd20557d21fe20602c00a60bfeaea78d3c95fe5e
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agoUnionInputStream: combines sequential InputStreams into one 53/153/3
Shawn O. Pearce [Sat, 28 Nov 2009 01:22:40 +0000 (17:22 -0800)]
UnionInputStream: combines sequential InputStreams into one

The UnionInputStream utility class combines multiple sequential
InputStreams so they appear to the caller as a single stream with
no gaps.  This can be used to concentate streams coming from multiple
independent HTTP connections (for example).

The companion unit test covers the class's full functionality.

Change-Id: I0676c7b5e082a5886bf0e8f43f9fd6c46a666228
Signed-off-by: Shawn O. Pearce <sop@google.com>
14 years agoAdd getPacks to ObjectDirectory 40/40/6
Shawn O. Pearce [Wed, 7 Oct 2009 01:21:03 +0000 (18:21 -0700)]
Add getPacks to ObjectDirectory

This exposes the list of known packs, allowing callers to list them
into a context like the objects/info/packs file.

Change-Id: I0b889564bd176836ff5c77ba310c6d229409dcd5
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agoMerge change I67d3ed54
Code Review [Tue, 29 Dec 2009 00:28:59 +0000 (19:28 -0500)]
Merge change I67d3ed54

* changes:
  Added -crfl attribute for DiffFormatterReflowTest test data

14 years agoSwitch build to Apache Felix maven-bundle-plugin 59/159/4
Shawn O. Pearce [Mon, 28 Dec 2009 20:01:19 +0000 (12:01 -0800)]
Switch build to Apache Felix maven-bundle-plugin

Tycho isn't production ready for projects like JGit to be using as
their primary build driver.  Some problems we ran into with Tycho
0.6.0 that are preventing us from using it are:

 * Tycho can't run offline

   The P2 artifact resolver cannot perform its work offline.  If the
   build system has no network connection, it cannot compile a
   project through Tycho.  This is insane for a distributed version
   control system where developers are used to being offline during
   development and local testing.

 * Magic state in ~/.m2/repository/.meta/p2-metadata.properties

   Earlier iterations of this patch tried to use a hybrid build,
   where Tycho was only used for the Eclipse specific feature and P2
   update site, and maven-bundle-plugin was used for the other code.
   This build seemed to work, but only due to magic Tycho specific
   state held in my local home directory.  This means builds are not
   consistently repeatable across systems, and lead me to believe
   I had a valid build, when in fact I did not.

 * Manifest-first build produces incomplete POMs

   The POM created by the manifest-first build format does not
   contain the dependency chain, leading a downstream consumer to
   not import the runtime dependencies necessary to execute the
   bundle it has imported.  In JGit's case, this means JSch isn't
   included in our dependency chain.

 * Manifest-first build produces POMs unreadable by Maven 2.x

   JGit has existing application consumers who are relying on
   Maven 2.x builds.  Forcing them to step up to an alpha release
   of Maven 3 is simply unacceptable.

 * OSGi bundle export data management is tedious

   Editing each of our pom.xml files to mark a new release is
   difficult enough as it is.  Editing every MANIFEST.MF file to
   list our exported packages and their current version number is
   something a machine should do, not a human.  Yet the Tycho OSGi
   way unfortunately demands that a human do this work.

 * OSGi bundle import data management is tedious

   There isn't a way in the MANIFEST.MF file format to reuse the
   same version tags across all of our imports, but we want to have
   a consistent view of our dependencies when we compile JGit.

After wasting more than 2 full days trying to get Tycho to work,
I've decided its a lost cause right now.  We need to be chasing down
bugs and critical features, not trying to bridge the gap between
the stable Maven repository format and the undocumented P2 format
used only by Eclipse.

So, switch the build to use Apache Felix's maven-bundle-plugin.

This is the same plugin Jetty uses to produce their OSGi bundle
manifests, and is the same plugin used by the Apache Felix project,
which is an open-source OSGi runtime.  It has a reasonable number
of folks using it for production builds, and is running on top of
the stable Maven 2.x code base.

With this switch we get automatically generated MANIFEST.MF files
based on reasonably sane default rules, which reduces the amount
of things we have to maintain by hand.  When necessary, we can add
a few lines of XML to our POMs to tweak the output.

Our build artifacts are still fully compatible with Maven 2.x, so
any downstream consumers are still able to use our build products,
without stepping up to Maven 3.x.  Our artifacts are also valid as
OSGi bundles, provided they are organized on disk into a repository
that the runtime can read.

With maven-bundle-plugin the build runs offline, as much as Maven
2.x is able to run offline anyway, so we're able to return to a
distributed development environment again.

By generating MANIFEST.MF at the top level of each project (and
therefore outside of the target directory), we're still compatible
with Eclipse's PDE tooling.  Our projects can be imported as standard
Maven projects using the m2eclipse plugin, but the PDE will think
they are vaild plugins and make them available for plugin builds,
or while debugging another workbench.

This change also completely removes Tycho from the build.

Unfortunately, Tycho 0.6.0's pom-first dependency resolver is broken
when resolving a pom-first plugin bundle through a manifest-first
feature package, so bundle org.eclipse.jgit can't be resolved,
even though it might actually exist in the local Maven repository.

Rather than fight with Tycho any further, I'm just declaring it
plugina-non-grata and ripping it out of the build.

Since there are very few tools to build a P2 format repository, and
no documentation on how to create one without running the Eclipse
UI manually by poking buttons, I'm declaring that we are not going
to produce a P2 update site from our automated builds.

Change-Id: If7938a86fb0cc8e25099028d832dbd38110b9124
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agoRecognize Git repository environment variables 32/132/4
Robin Rosenberg [Wed, 9 Dec 2009 08:54:08 +0000 (09:54 +0100)]
Recognize Git repository environment variables

This makes the jgit command line behave like the C Git implementation
in the respect.

These variables are not recognized in the core, though we add support
to do the overrides there. Hence other users of the JGit library, like
the Eclipse plugin and others, will not be affected.

GIT_DIR
The location of the ".git" directory.

GIT_WORK_TREE
The location of the work tree.

GIT_INDEX_FILE
The location of the index file.

GIT_CEILING_DIRECTORIES
A colon (semicolon on Windows) separated list of paths that
which JGit will not cross when looking for the .git directory.

GIT_OBJECT_DIRECTORY
The location of the objects directory under which objects are
stored.

GIT_ALTERNATE_OBJECT_DIRECTORIES
A colon (semicolon on Windows) separated list of object directories
to search for objects.

In addition to these we support the core.worktree config setting when
the git directory is set deliberately instead of being found.

Change-Id: I2b9bceb13c0f66b25e9e3cefd2e01534a286e04c
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agoAdd support for creating detached heads 46/146/3
Robin Rosenberg [Mon, 28 Dec 2009 15:49:50 +0000 (16:49 +0100)]
Add support for creating detached heads

An extra flag when creating a RefUpdate object allows the
caller to destroy the symref and replace it with an object
ref, a.k.a. detached HEAD.

Change-Id: Ia88d48eab1eb4861ebfa39e3be9258c3824a19db
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agoUse Constants.OBJECT_ID_STRING_LENGTH instead of LEN * 2 64/164/1
Shawn O. Pearce [Mon, 28 Dec 2009 23:55:49 +0000 (15:55 -0800)]
Use Constants.OBJECT_ID_STRING_LENGTH instead of LEN * 2

A few locations were doing OBJECT_ID_LENGTH * 2 on their own, as
the old STR_LEN constant wasn't visible.  Replace them with the
new public constant OBJECT_ID_STRING_LENGTH.

Change-Id: Id39bddb52de8c65bb097de042e9d4ed99598201f
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agoGet rid of a duplicate constant for SHA-1 length 49/149/10
Robin Rosenberg [Mon, 28 Dec 2009 15:54:43 +0000 (16:54 +0100)]
Get rid of a duplicate constant for SHA-1 length

Since Constants.OBJECT_ID_LENGTH is a compile time constant we
can be sure that it will always be inlined. The same goes for the
associated constant STR_LEN which is now refactored to the Constant
class and given a name better suited for wider use.

Change-Id: I03f52131e64edcd0aa74bbbf36e7d42faaf4a698
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
14 years agoAdded -crfl attribute for DiffFormatterReflowTest test data 63/163/1
Constantine Plotnikov [Fri, 13 Nov 2009 14:30:08 +0000 (17:30 +0300)]
Added -crfl attribute for DiffFormatterReflowTest test data

The test data is expected to have unix new lines by tests, but it
is converted to crlf on Windows platform (with msys git). As result
DiffFormatterReflowTest tests fail. To prevent this problem,
crlf conversion is disbled for test data related to that test.

Bug: 295077
Change-Id: I67d3ed543fcc38647041896146de12b1781ec6be
Signed-off-by: Constantine Plotnikov <constantine.plotnikov@gmail.com>
14 years agoMerge change I5b232f67
Code Review [Tue, 22 Dec 2009 19:10:56 +0000 (14:10 -0500)]
Merge change I5b232f67

* changes:
  Fix typo in ReceivePack.java

14 years agoFix typo in ReceivePack.java 55/155/1
Nico Sallembien [Tue, 22 Dec 2009 19:02:24 +0000 (11:02 -0800)]
Fix typo in ReceivePack.java

The comment indicates that a well-behaved client should not have
sent an update for a ref that already exists, but this in a block
that corresponds to a create command.

14 years agoDon't crash if we try to load the config for a MockSystemReader 47/147/3
Robin Rosenberg [Mon, 14 Dec 2009 08:06:22 +0000 (09:06 +0100)]
Don't crash if we try to load the config for a MockSystemReader

Instead do nothing.  For now, save() will fail and the config
file is set to null, which may surprise some calling tests.

Change-Id: I1c65f8b1131569da01b4ef33678d813565521fbb
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agoUse Tycho version 0.6.0 48/148/2
Igor Fedorenko [Sat, 19 Dec 2009 00:06:38 +0000 (19:06 -0500)]
Use Tycho version 0.6.0

Changed Tycho version from 0.6.0-SNAPSHOT to 0.6.0 (i.e. release).
SNAPSHOT versions are transient and should only be used for testing
purposes only. Also removed now unnecessary <pluginRepositories/>
element from JGit parent pom.xml file.

Change-Id: Ie386b2dbcba43c1ccec10465978d12d6829c6150
Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
14 years agoMethod to get a 'humanish' name from a path 15/115/5
Mykola Nikishov [Thu, 17 Dec 2009 23:03:51 +0000 (01:03 +0200)]
Method to get a 'humanish' name from a path

Change-Id: Iec0688232bd59d4626111d77633109918e8e1df3
Signed-off-by: Mykola Nikishov <mn@mn.com.ua>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
14 years agoIgnore target/ folder and compile.org.eclipse.jgit.xml 36/136/4
Mykola Nikishov [Thu, 10 Dec 2009 01:28:07 +0000 (03:28 +0200)]
Ignore target/ folder and compile.org.eclipse.jgit.xml

target/ is for Maven build output
compile.org.eclipse.jgit.xml is generated on Export - Deployable Features

Signed-off-by: Mykola Nikishov <mn@mn.com.ua>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: I557a95792fd45c3cfe37098e057c1e70660b3308

14 years agoFlipped jgit.core to manifest-first maven-3/tycho build 25/125/3
Igor Fedorenko [Sat, 5 Dec 2009 06:07:42 +0000 (01:07 -0500)]
Flipped jgit.core to manifest-first maven-3/tycho build

Change-Id: I6005134a45046d16e323a2f9b2815831cdbe15e0
Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
15 years agoReplace a hard-coded default remote's name with a constant 13/113/2
Mykola Nikishov [Wed, 25 Nov 2009 20:37:02 +0000 (22:37 +0200)]
Replace a hard-coded default remote's name with a constant

Change-Id: I4e369382b8a83a5c0772462d1b176b1e23910ada

15 years agotools/version.sh: Update embedded version numbers in build products 11/111/1
Shawn O. Pearce [Tue, 17 Nov 2009 18:25:14 +0000 (10:25 -0800)]
tools/version.sh: Update embedded version numbers in build products

We can now use `tools/version.sh --release` to update the MANIFEST.MF
and Maven POM files with the current version number of this project,
so they appear in any build product created.

The counterpart --snapshot option be used to reset files to use
their natural *-SNAPSHOT and *.qualifier state during development.

We use a simple Bourne shell script with Perl calls because we
must edit both Maven pom.xml and OSGi bundle MANIFEST.MF in order
to store the correct data for our parallel build systems.  In the
future we should use a native Java solution which relies upon JGit
to compute the `git describe` portion.

Until we tag our first official release a "tagged snapshot" can be
made by creating an artifical annotated tag first:

  git tag -a -m "initial contribution" v0.5.1 046198cf5f21e5a63e8ec0ecde2ef3fe21db2eae
  tools/version.sh --release

Resulting in a version string like "0.5.1.50-ge16af83".

Change-Id: Ic2bbae75bf96fc8831324c62c2212131277f70e4
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoAdd performance tests for MyersDiff 87/87/5
Christian Halstrick [Mon, 19 Oct 2009 15:10:10 +0000 (17:10 +0200)]
Add performance tests for MyersDiff

Add some tests which make sure that the diff algorithm really behaves in the
promised O(N*D) manner. This tests compute diffs between multiple big chunks
of data, measure time for computing the diffs and fail if the measured times
are off O(N*D) by more than a factor 10

Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
Change-Id: I8e1e0be60299472828718371b231f1d8a9dc21a7
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
15 years agoUse a more specific Bugzilla URL 07/107/1
Shawn O. Pearce [Wed, 4 Nov 2009 16:57:29 +0000 (08:57 -0800)]
Use a more specific Bugzilla URL

This URL filters the search results within the entire Eclipse.org
Bugzilla server to only this that are open and pertain to our
project.  It also sets up the "File a new bug" link to send any
new issue in our direction.

Change-Id: I5d50a2e7d0b34efb386492aedfe28f4ae67f92bc
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoUse JUnit 3.8.2 under CQ 3589 06/106/1
Shawn O. Pearce [Wed, 4 Nov 2009 16:32:50 +0000 (08:32 -0800)]
Use JUnit 3.8.2 under CQ 3589

CQ 3589 was submitted to request permission to use JUnit 3.8.2
from Orbit.  We don't redistribute JUnit but we compile against it
and do redistribute a test support JAR (org.eclipse.jgit.junit)
that would depend upon it if someone were to develop their own
application code and also wish to write unit tests with JUnit.

Change-Id: I23b1f23e064224363585ec2f5dd62a0b4d28fb5b
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoRemove reference to branding plugin 04/104/1
Matthias Sohn [Wed, 4 Nov 2009 00:53:09 +0000 (01:53 +0100)]
Remove reference to branding plugin

JGit does not contribute to the Eclipse UI hence it should not refer
to a branding plugin. See discussion on egit-dev :
http://dev.eclipse.org/mhonarc/lists/egit-dev/msg00304.html until
http://dev.eclipse.org/mhonarc/lists/egit-dev/msg00306.html

Change-Id: I9153dea60d9d1724662ca079f16528a36c295b5d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
15 years agoMerge changes I057c782c,Idff096ce,Ic9be0280,I07014d1b,Id8a76ee7,I9080f3dd,I8c1a0eb8...
Code Review [Tue, 3 Nov 2009 19:33:09 +0000 (14:33 -0500)]
Merge changes I057c782c,Idff096ce,Ic9be0280,I07014d1b,Id8a76ee7,I9080f3dd,I8c1a0eb8,Ibaf87bb5,I9e1f1f5a,I355e95fa

* changes:
  Prompt for passwords from the console in jgit command line tools
  Move AWT based SSH authenticator to ui bundle
  Refactor the cached Authenticator data out of AwtAuthenticator
  Only import the sample data packs on tests that need them
  Move T0007_Index to exttst
  Refactor RepositoryTestCase to use LocalDiskRepository instead
  Create JUnit test utilities for JGit derived sources
  Delete obsolete JarLinkUtil
  Refactor our Maven build to be modular
  Switch pgm, test to proper plugin projects

15 years agoMerge change Ic1c8969b
Code Review [Tue, 3 Nov 2009 19:19:30 +0000 (14:19 -0500)]
Merge change Ic1c8969b

* changes:
  Use org.eclipse.egit branding plugin

15 years agoPrompt for passwords from the console in jgit command line tools 36/36/3
Shawn O. Pearce [Sun, 1 Nov 2009 02:39:18 +0000 (19:39 -0700)]
Prompt for passwords from the console in jgit command line tools

If we are on a Java 6 JVM we should have the Console class available,
unless the user has redirected /dev/null to stdin.  When there is a
console present we would prefer to use that for command line prompts
as that is what the user expects from a command line tool.

Change-Id: Ibaf87bb5540371d94d96d1b7e94ca002f752e5bd
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoMove AWT based SSH authenticator to ui bundle 34/34/3
Shawn O. Pearce [Sun, 1 Nov 2009 02:42:01 +0000 (19:42 -0700)]
Move AWT based SSH authenticator to ui bundle

This way SWT based applications don't wind up loading this AWT
based code when using SSH.

Change-Id: I9080f3dd029c2a087e6b687480018997cc5c5d23
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoRefactor the cached Authenticator data out of AwtAuthenticator 35/35/3
Shawn O. Pearce [Sat, 3 Oct 2009 23:52:33 +0000 (16:52 -0700)]
Refactor the cached Authenticator data out of AwtAuthenticator

This makes it easier to swap out authenticator implementations and
yet still rely upon being able to configure at least one Authenticator
instance in the JVM and program it with data obtained from outside
of the user interface.

Change-Id: I8c1a0eb8acee1d306f4c3b40a790b7fa0c3abb70
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoOnly import the sample data packs on tests that need them 22/22/3
Shawn O. Pearce [Sat, 3 Oct 2009 01:58:22 +0000 (18:58 -0700)]
Only import the sample data packs on tests that need them

Not all of our test cases really require the sample data packs,
and we are better off not using them because its hard to see exactly
what condition a test is testing when looking only at the Java code.
Clarify the dependency by only making the packs available when
there is a real need for it.

Change-Id: Id8a76ee7ee1f7efba585be4bed19a8fb5b3b3585
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoMove T0007_Index to exttst 20/20/3
Shawn O. Pearce [Sat, 3 Oct 2009 01:07:24 +0000 (18:07 -0700)]
Move T0007_Index to exttst

This test depends upon the external git binary, and this isn't
really a pure Java test like our module tries to claim itself is.
So we move it out to exttst with other tests that require additional
external resources and/or executable code.

Change-Id: Ic9be0280c8bb50a5768336c64de794eb0a492b3d
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoRefactor RepositoryTestCase to use LocalDiskRepository instead 21/21/3
Shawn O. Pearce [Mon, 5 Oct 2009 18:25:43 +0000 (11:25 -0700)]
Refactor RepositoryTestCase to use LocalDiskRepository instead

Change-Id: I07014d1b8cc2fab0761d644a12e4ae04f0adf3ef
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoCreate JUnit test utilities for JGit derived sources 19/19/3
Shawn O. Pearce [Sat, 3 Oct 2009 01:08:56 +0000 (18:08 -0700)]
Create JUnit test utilities for JGit derived sources

The LocalDiskRepositoryTestCase class is derived from the current
RepositoryTestCase code and is meant for application (or our own)
tests to subclass and access temporary repositories on the local
client disk.

Change-Id: Idff096cea40a7b2b56a90fb5de179ba61ea3a0eb
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoDelete obsolete JarLinkUtil 14/14/3
Shawn O. Pearce [Sat, 3 Oct 2009 00:12:37 +0000 (17:12 -0700)]
Delete obsolete JarLinkUtil

Since we are now using the maven-shade-plugin to flatten out our
dependencies into a single stand-alone JAR we no longer need to
use our own command line utility.

Change-Id: I057c782cc66c44f11ed2ff2b4b4ca9cc82c7426a
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoRefactor our Maven build to be modular 03/103/2
Shawn O. Pearce [Sun, 1 Nov 2009 01:07:26 +0000 (18:07 -0700)]
Refactor our Maven build to be modular

Drop our simple and stupid jgit.sh and instead rely upon Maven
for the command line based build.  Maven is relatively simple to
download and install, and doesn't require the entire Eclipse IDE.

To avoid too much refactoring of the current code we reuse the
existing src/ directory within each plugin, and treat each of
the existing OSGI bundles as one Maven artifact.

The command line wrapper jgit.sh no longer works in the uncompiled
state, as we don't know where to obtain our JSch or args4j from.
Developers will now need to compile it with `mvn package`, or run
our Main class from within an IDE which has the proper classpath.

Bug: 291265
Change-Id: I355e95fa92fa7502651091d2b651be6917a26805
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoSwitch pgm, test to proper plugin projects 02/102/2
Shawn O. Pearce [Sun, 1 Nov 2009 01:47:16 +0000 (18:47 -0700)]
Switch pgm, test to proper plugin projects

This way we depend upon the MANIFEST.MF to define our classpath
and our build will act more like any other OSGI bundle build.

Change-Id: I9e1f1f5a0bccb0ab0e39e49b75fb400fea446619
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoCorrect location of AmazonS3 command line client 01/101/1
Shawn O. Pearce [Sun, 1 Nov 2009 00:11:29 +0000 (17:11 -0700)]
Correct location of AmazonS3 command line client

This code belongs inside of the org.eclipse.jgit.pgm bundle
so it is executable from the command line.

In af5cb5ced938 ("Move AmazonS3 command line utility to jgit-pgm")
I accidentally moved this class into the wrong directory, probably
during some sort of rebase when I tried to pull this commit out of
its original position in an abanonded Maven refactoring series.

Change-Id: I19adafa87b70586dd44040e9dfce30f3d482ed28
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoMove AWT UI code to new org.eclipse.jgit.ui bundle 73/73/2
Mykola Nikishov [Fri, 9 Oct 2009 18:57:59 +0000 (21:57 +0300)]
Move AWT UI code to new org.eclipse.jgit.ui bundle

This new UI bundle contains the org.eclipse.jgit.awtui package,
which was moved out of the org.eclipse.jgit bundle.

org.eclipse.jgit.pgm depends on org.eclipse.jgit.ui, so we need
to update the classpath and make_jgit.sh to include it.

This move takes the awtui classes out of the Maven build, which
means we are no longer able to distribute these classes to our
downstream Maven customers.  The entire Maven package structure
needs to be overhauled so that Eclipse bundle matches 1:1 with the
Maven artifact.

Bug: https://bugs.eclipse.org/291124
Change-Id: Ibf1a9968387e3d11fdce54592f710ec4cc7f1ddb
Signed-off-by: Mykola Nikishov <mn@mn.com.ua>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoDon't create .git/remotes folders on init 98/98/2
Sasa Zivkov [Fri, 9 Oct 2009 12:43:45 +0000 (14:43 +0200)]
Don't create .git/remotes folders on init

For historical reasons JGit was creating .git/remotes folder when
initialization an empty repository.  However, this folder is never
used and the new Git repository format doesn't contain them.

Removed the unnecessary remotes folder creation, it was removed from
C Git in 75c384efb52d ("Do not create $GIT_DIR/remotes/ directory
anymore") by Junio C Hamano on Dec 19 2006.  C Git hasn't made it
for almost 3 years.

Change-Id: I5473f3676a3642afdf9aaac44b7e6319c6e170b9
Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoMove pure IO utility functions to a utility class of its own. 96/96/3
Robin Rosenberg [Sat, 24 Oct 2009 09:48:04 +0000 (11:48 +0200)]
Move pure IO utility functions to a utility class of its own.

According the javadoc, and implied by the name of the class, NB
is about network byte order. The purpose of moving the IO only,
and non-byte order related functions to another class is to
make it easier for new contributors to understand that they
can use these functions in general and it's also makes it easier
to understand where to put new IO related utility functions

Change-Id: I4a9f6b39d5564bc8a694b366e7ff3cc758c5181b
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoEclipse IDE: Automatically remove trailing whitespace on save 99/99/1
Shawn O. Pearce [Sat, 31 Oct 2009 21:53:29 +0000 (14:53 -0700)]
Eclipse IDE: Automatically remove trailing whitespace on save

Our project coding conventions do not want trailing whitespace at
the end of a source code line.  Configure Eclipse to automatically
remove them when saving any Java source file.

Change-Id: I9701366b3b1240879761b30556e6ff416e969e1d
Reviewed-by: Mykola Nikishov <mn@mn.com.ua>
Reviewed-by: Alex Blewitt <alex.blewitt@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoRemove trailing whitespace at end of line 86/86/2
Alex Blewitt [Mon, 19 Oct 2009 08:48:00 +0000 (09:48 +0100)]
Remove trailing whitespace at end of line

As discussed on the egit-dev mailing list, we prefer not to have
trailing whitespace in our source code.  Correct all currently
offending lines by trimming them.

Change-Id: I002b1d1980071084c0bc53242c8f5900970e6845
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoCorrecting explanation of EDL 97/97/1
Matthias Sohn [Wed, 28 Oct 2009 12:57:32 +0000 (13:57 +0100)]
Correcting explanation of EDL

Change-Id: I2f65022df4e6fe9b1db87eb29e9b079543984298
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
15 years agoUse org.eclipse.egit branding plugin 90/90/1
Matthias Sohn [Mon, 19 Oct 2009 22:53:57 +0000 (00:53 +0200)]
Use org.eclipse.egit branding plugin

We do not need two branding plugins for two related features
and org.eclipse.jgit is not a branding plugin.

Change-Id: Ic1c8969bbed89f693c7e11108d6baba013f71711
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
15 years agoAdd gitignore to constants 67/67/2
Mykola Nikishov [Thu, 15 Oct 2009 08:41:21 +0000 (09:41 +0100)]
Add gitignore to constants

Bug: 291133
Change-Id: I24272d029cff446ffc80063870478577d628f338
Reviewed-by: Alex Blewitt <alex.blewitt@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoRefactor org.eclipse.jgit.test to be a bundle 64/64/2
Chris Aniszczyk [Tue, 13 Oct 2009 20:53:55 +0000 (15:53 -0500)]
Refactor org.eclipse.jgit.test to be a bundle

This way dependencies are described by the MANIFEST.MF,
and the same build tools can be used to compile the tests.

Change-Id: I4dc926148410ecbadcf71b9474aeeb509691aa32

15 years agoFix classpath to use jsch and args4j from orbit 61/61/2
Matthias Sohn [Mon, 12 Oct 2009 20:25:05 +0000 (22:25 +0200)]
Fix classpath to use jsch and args4j from orbit

All 3rd party dependencies must come from orbit to comply
with Eclipse development process.

Change-Id: Ia43892ab6d0169f8335c1a41b37e8c12e94cafe2
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
15 years agoAdd javadoc comments, remove unused code, shift comments to correct place 53/53/1
Christian Halstrick [Fri, 9 Oct 2009 14:18:59 +0000 (16:18 +0200)]
Add javadoc comments, remove unused code, shift comments to correct place

This change only fixes warnings of the eclipse build regarding missing javadocs.
Some comments where just missing, so they have been added. Other comments where
at the wrong (from eclipse point of view) place, so eclipse was complaining.
Also two method which existed for debugging purposes have been removed to get
rid of Eclipse warngins about unused code.

15 years agoMerge change Iacb9082e into cq-diff
Code Review [Thu, 8 Oct 2009 22:45:20 +0000 (18:45 -0400)]
Merge change Iacb9082e into cq-diff

* changes:
  Fixed MyersDiff to be able to handle more than 100k

15 years agoFixed MyersDiff to be able to handle more than 100k 37/37/4
Christian Halstrick [Tue, 6 Oct 2009 14:21:39 +0000 (16:21 +0200)]
Fixed MyersDiff to be able to handle more than 100k

MyersDiff was crashing with ArrayIndexOutOfBoundsException when
diffing huge files. This was because the snake data (begin and
end position while processing chunks of the text) was sequeezed
into a single int. But with longer texts to diff these values
exceeded the range of java int values. It is fixed by squeezing
the two ints into a long and by adding the LongList helper
class.

Change-Id: Iacb9082e1b076e994d1486aa8e512342ad7432b3
Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
15 years agoMake the default encoding when reading commits UTF-8
Constantine Plotnikov [Thu, 8 Oct 2009 16:12:08 +0000 (20:12 +0400)]
Make the default encoding when reading commits UTF-8

When reading commits the system default encoding was used if no
encoding was specified in the commit. The patch modifies the test
to add a check that commit message was encoded correctly (the
test fails on old implementation if system encoding is not UTF-8)
and fixes Commit.decode() method to use UTF-8 if encoding is not
specified in the commit object.

Change-Id: I27101da3c2eb6edd0c4a9e4c0523e48b286e3cd5
Signed-off-by: Constantine Plotnikov <constantine.plotnikov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoRemove a duplicate test from T0003_Basic 51/51/1
Robin Rosenberg [Wed, 7 Oct 2009 21:45:31 +0000 (23:45 +0200)]
Remove a duplicate test from T0003_Basic

In the pre-historic commit 6d87484b4dee5671a38e64a8e4990dff40a4874f
two tests became identical. Remove one of them.

Change-Id: I6182ecd4db0162d87a5f4577005b2bf4d5e8c89f

Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
15 years agoFix some warnings regarding unnecessary imports and accessing static methods 39/39/2
Christian Halstrick [Tue, 6 Oct 2009 09:16:31 +0000 (11:16 +0200)]
Fix some warnings regarding unnecessary imports and accessing static methods

My Galileo eclipse was complaining about unneeded import statements and
how static methods have been accessed in Diff.java. There was also one method
call which could be removed because he had no sideeffects and the return value
was not used. I fixed this so that there are no warnings anymore.

Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
Change-Id: I48d7e01536aab1524140d72af574e3fd7149cd23

15 years agoAdd the "jgit diff" command 10/10/2
Johannes Schindelin [Thu, 3 Sep 2009 10:47:08 +0000 (12:47 +0200)]
Add the "jgit diff" command

This commit contains fixes provided by Christian Halstrick.

Bug: 291083
Eclipse-CQ: 3559
Change-Id: If8d187e70a51f31040f99098489e513791dc6415
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoPrepare RawText for diff-index and diff-files 09/9/2
Johannes Schindelin [Thu, 3 Sep 2009 10:47:01 +0000 (12:47 +0200)]
Prepare RawText for diff-index and diff-files

Bug: 291083
Eclipse-CQ: 3559
Change-Id: Ia02f346a96b5f1e24f8bc9676bd428b968a41222
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoAdd a test class for Myers' diff algorithm 08/8/2
Johannes Schindelin [Thu, 3 Sep 2009 10:46:51 +0000 (12:46 +0200)]
Add a test class for Myers' diff algorithm

Bug: 291083
Eclipse-CQ: 3559
Change-Id: I5a10946637438052e7596489b9f9de3a0c6b2066
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoAdd Myers' algorithm to generate diff scripts 07/7/2
Johannes Schindelin [Thu, 3 Sep 2009 10:46:41 +0000 (12:46 +0200)]
Add Myers' algorithm to generate diff scripts

Myers' algorithm is the standard way to generate diff scripts in
an efficient manner (especially memory-wise).

The source contains extensive documentation about the principal
ideas of the algorithm.

Bug: 291083
Eclipse-CQ: 3559
Change-Id: Id873e7c2c204692cb4a1a05d24b733154b9ed49c
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoAdd set to IntList 06/6/2
Johannes Schindelin [Thu, 3 Sep 2009 10:46:31 +0000 (12:46 +0200)]
Add set to IntList

Some applications may wish to modify an int list.

Bug: 291083
Eclipse-CQ: 3559
Change-Id: Iea871443ec661230aec92397229f1eda6c74216f
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoMerge changes I282ee1c6,I5700ca48,Ic243544a,Ia2cce34d,I2fd81be2
Code Review [Mon, 5 Oct 2009 21:29:56 +0000 (17:29 -0400)]
Merge changes I282ee1c6,I5700ca48,Ic243544a,Ia2cce34d,I2fd81be2

* changes:
  Move HttpSupport's configureHttpProxy to jgit-pgm
  Move AmazonS3 command line utility to jgit-pgm
  Move setupReflog test function to only test that cares
  Remove useless test005_todopack test
  Standardize the source code formatter for Eclipse

15 years agoMark JGit plugin as 0.6
Shawn O. Pearce [Mon, 5 Oct 2009 21:17:16 +0000 (14:17 -0700)]
Mark JGit plugin as 0.6

Our project plan calls for us to build 0.6 as the next version,
but I forgot to also update the MANIFEST.MF for the plugin when
I edited the Maven pom.

Change-Id: Ic1a6c64374a4384a65a3dd0306adddfc73adac52
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoAdd org.eclipse.jgit-feature
Mykola Nikishov [Fri, 2 Oct 2009 09:18:15 +0000 (12:18 +0300)]
Add org.eclipse.jgit-feature

[sp: Externalized all strings for translation]

Change-Id: Ib3f6e58e9e1cbcbc41705b6e1be37a89ca38f1a9
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoMove HttpSupport's configureHttpProxy to jgit-pgm 33/33/3
Shawn O. Pearce [Sat, 3 Oct 2009 22:53:24 +0000 (15:53 -0700)]
Move HttpSupport's configureHttpProxy to jgit-pgm

This is the last chunk of code in jgit-core which references the awtui
package.  Moving it to the only consumer in jgit-pgm allows us to move
the awtui package over to the jgit-awtui module.

Change-Id: I2fd81be2076117b2f2c5f8ed45de7f29272af6cf
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoMove AmazonS3 command line utility to jgit-pgm 32/32/3
Shawn O. Pearce [Sat, 3 Oct 2009 22:43:34 +0000 (15:43 -0700)]
Move AmazonS3 command line utility to jgit-pgm

This removes one of the few remaining dependencies on AWTAuthenticator
from the core library.  For the most part the interface is identical to
the prior main method.  The jgit-pgm Main class already sets up the
HTTP proxy and authenticator for us, so we don't need to do that in
our new run method.

Change-Id: Ia2cce34d34c97b88214a8bd8f2cc542845e19032
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoMove setupReflog test function to only test that cares 18/18/3
Shawn O. Pearce [Sat, 3 Oct 2009 01:54:20 +0000 (18:54 -0700)]
Move setupReflog test function to only test that cares

Only one test class actually needs this function, so instead of
us inheriting it down into every test, move it to that one class.

Change-Id: I5700ca48df4177153f2b3861dec7c538c621e775
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoRemove useless test005_todopack test 17/17/3
Shawn O. Pearce [Sat, 3 Oct 2009 02:01:04 +0000 (19:01 -0700)]
Remove useless test005_todopack test

This test doesn't work because it requires a pack file which we have
lost to the ages.  We couldn't include it because the pack was actually
a copy of the GPL'd C git.git project, and was there to test some sort
of corner case that the test never documented properly.

Change-Id: I282ee1c6a637a8654df93a3847507a6c60e4cfab
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoStandardize the source code formatter for Eclipse 23/23/3
Shawn O. Pearce [Mon, 5 Oct 2009 18:43:01 +0000 (11:43 -0700)]
Standardize the source code formatter for Eclipse

We now supply an exported format description for anyone to import
into their own workbench, and all projects reference this style in
a consistent way.

Change-Id: Ic243544a761ef2db29025a89ba6bb932a3a3ce34
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoMerge change I11dc6200
Code Review [Mon, 5 Oct 2009 19:13:57 +0000 (15:13 -0400)]
Merge change I11dc6200

* changes:
  Mark the next version as 0.6

15 years agoMark the next version as 0.6 24/24/2
Shawn O. Pearce [Mon, 5 Oct 2009 18:45:56 +0000 (11:45 -0700)]
Mark the next version as 0.6

Our project plan calls for us to build 0.6 as the next version.

Change-Id: I11dc620009d83e5715f7f2c17bbc658cc6e49f20
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoMerge change I908e4c77
Code Review [Mon, 5 Oct 2009 14:06:24 +0000 (10:06 -0400)]
Merge change I908e4c77

* changes:
  Add support for logAllRefUpdates configuration parameter

15 years agoAdd support for logAllRefUpdates configuration parameter 03/3/2
Christian Halstrick [Thu, 1 Oct 2009 14:13:09 +0000 (16:13 +0200)]
Add support for logAllRefUpdates configuration parameter

Honor the configuration parameter core.logAllRefUpdates when writing
reflogs.  Instead of writing reflog entries always only write
reflogs if this parameter is set to true or if the corresponding
file in the <git-dir>/logs directory already exists. In other words:
if you are updating a ref and this parameter is set to false and
there is no file corresponding to your ref in the <git-dir>/logs
folder then no reflog will be written.

This is a fix for the issue http://code.google.com/p/egit/issues/detail?id=4

Change-Id: I908e4c77e3630dc3223b2d2a47cb4534dbe4ed42
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoRemove TODO file and move to bugzilla
Shawn O. Pearce [Fri, 2 Oct 2009 16:54:31 +0000 (09:54 -0700)]
Remove TODO file and move to bugzilla

There is no longer any value in keeping track of things we need to
implement in a file in the top level of the source code.  Time has
proven we don't keep it current, as some of these features are
already implemented, and some are still being worked on.

Worse, many of these items were for the EGit plugin, which has no
relationship to JGit.

Change-Id: Iaa83491819518a1293810aafb566354bdc4b5e28
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoFix SUBMITTING_PATCHES to follow the Eclipse IP process
Shawn O. Pearce [Fri, 2 Oct 2009 16:50:48 +0000 (09:50 -0700)]
Fix SUBMITTING_PATCHES to follow the Eclipse IP process

I somehow missed that SUBMITTING_PATCHES referenced the older "send
to git mailing list by email" patch process we used for the first
few years of the JGit project's life.  Now that we are hosted under
the Eclipse Foundation umbrella we need to follow their IP process
for all contributions.

Change-Id: Ia29b31746826ca5b914e0a1d108c2166ff64d268
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoFix tabs-to-spaces in SUBMITTING_PATCHES
Shawn O. Pearce [Fri, 2 Oct 2009 16:47:04 +0000 (09:47 -0700)]
Fix tabs-to-spaces in SUBMITTING_PATCHES

Change-Id: I1cf5b4355a147c39107c8b97e56108f482c96d8d
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoUpdate SUBMITTING_PATCHES to point to Contributor Guide
Shawn O. Pearce [Fri, 2 Oct 2009 16:42:44 +0000 (09:42 -0700)]
Update SUBMITTING_PATCHES to point to Contributor Guide

The process is likely to change as we experiment with Gerrit Code
Review and learn the Eclipse IP process.  Lets point the potential
contributor at a wiki that we can more easily keep up-to-date.

Change-Id: I99f7cb9edadd0f23024f59ec139dd1e35f5fbd3f
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoDocument protected members of RevObjectList
Shawn O. Pearce [Fri, 2 Oct 2009 16:27:42 +0000 (09:27 -0700)]
Document protected members of RevObjectList

Recently Eclipse started complaining about undocumented protected
members here, so lets document them to make the errors go away.

Change-Id: Ia3bc9fa69854953db5dc9a982821a2f3abe8d05a
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoMake it possible to clear a PlotCommitList 05/5/2
Jonas Fonseca [Sun, 20 Sep 2009 13:34:37 +0000 (09:34 -0400)]
Make it possible to clear a PlotCommitList

This allows SwingGraphPanes to be reused by simply clearing and
re-filling. Requires RevObjectList initialization to not call clear()
from its constructor, because this will lead PlotCommitList.clear()
to be called before all variables have been initialized.

Change-Id: I14a07124441b58cd88c67da088ba52ef9c30b043
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoInclude description for missing bundle prereqs 04/4/1
Sasa Zivkov [Tue, 29 Sep 2009 14:03:40 +0000 (16:03 +0200)]
Include description for missing bundle prereqs

When throwing MissingBundlePrerequisiteException we
also include the short description, if available, of
each missing object.

This is the fix for the following issue:
http://code.google.com/p/egit/issues/detail?id=25

Change-Id: I5d45aec7873af76a12170d9a500626a7264f2c42
Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoCleanup MANIFEST.MF in JGit
Chris Aniszczyk [Thu, 1 Oct 2009 21:12:50 +0000 (14:12 -0700)]
Cleanup MANIFEST.MF in JGit

- We shouldn't be re-exporting bundles, JSch in this case.
  Instead used a Import-Package clause.

- Some packages weren't exported.  In Eclipse we have a policy to
  export all the packages in a bundle

- Exporting version numbers on the export packages.

Bug: 291108
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>