Commit Graph

5820 Commits

Author SHA1 Message Date
Mykola Nikishov cf2edb6518 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>
2009-10-31 16:35:10 -07:00
Sasa Zivkov 99ab22c474 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>
2009-10-31 16:13:30 -07:00
Robin Rosenberg d4e7b70606 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>
2009-10-31 16:09:12 -07:00
Alex Blewitt 4d91645e89 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>
2009-10-31 14:48:44 -07:00
Mykola Nikishov 5208e50b4e 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>
2009-10-16 09:35:28 -07:00
Christian Halstrick 2484ad6fe0 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.
2009-10-09 16:18:59 +02:00
Christian Halstrick b3e4ac2622 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>
2009-10-09 00:35:44 +02:00
Constantine Plotnikov 982515cf10 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>
2009-10-08 10:19:34 -07:00
Johannes Schindelin a3aa43ecb1 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>
2009-10-06 07:43:29 -07:00
Johannes Schindelin e34865b88b 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>
2009-10-06 07:43:25 -07:00
Johannes Schindelin d8a3b4eb31 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>
2009-10-06 07:43:16 -07:00
Johannes Schindelin 9c056fcace 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>
2009-10-06 07:42:49 -07:00
Shawn O. Pearce 41e4b2fed4 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>
2009-10-05 12:17:11 -07:00
Shawn O. Pearce 8d5510d51c 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>
2009-10-05 12:17:11 -07:00
Code Review 720734983b Merge change I908e4c77
* changes:
  Add support for logAllRefUpdates configuration parameter
2009-10-05 10:06:24 -04:00
Christian Halstrick ffc8b42957 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>
2009-10-02 20:49:15 +02:00
Shawn O. Pearce 6828372f3e 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>
2009-10-02 09:27:42 -07:00
Jonas Fonseca 36b0dcf6cb 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>
2009-10-01 16:57:32 -07:00
Sasa Zivkov 96690904f5 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>
2009-10-01 16:41:43 -07:00
Git Development Community 1a6964c827 Initial JGit contribution to eclipse.org
Per CQ 3448 this is the initial contribution of the JGit project
to eclipse.org.  It is derived from the historical JGit repository
at commit 3a2dd9921c8a08740a9e02c421469e5b1a9e47cb.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-09-29 16:47:03 -07:00