]> source.dussan.org Git - jgit.git/log
jgit.git
12 years agoQuickfix for AutoCRLF handling 98/4998/4
Robin Rosenberg [Sat, 3 Mar 2012 07:22:48 +0000 (08:22 +0100)]
Quickfix for AutoCRLF handling

CRLF only works for small files, where small is the size of the
buffer, i.e. about 8K. This QD fix reallocates the buffer to be
large enough.

Bug: 369780
Change-Id: Ifc34ad204fbf5986b257a5c616e4a8c601e8261a

12 years agoAdd getters for old and new prefixes in DiffFormatter 44/5044/2
Tomasz Zarna [Thu, 2 Feb 2012 10:59:28 +0000 (11:59 +0100)]
Add getters for old and new prefixes in DiffFormatter

Bug: 370318
Change-Id: Iaf9282ba55ee3bb4e2c27fb71c598b308771bf57

12 years agoMerge "Add developers section to root POM file"
Matthias Sohn [Thu, 26 Jan 2012 12:42:55 +0000 (07:42 -0500)]
Merge "Add developers section to root POM file"

12 years agoMerge "Allow to list tags with org.eclipse.jgit.pgm.Tag"
Robin Rosenberg [Wed, 25 Jan 2012 18:10:15 +0000 (13:10 -0500)]
Merge "Allow to list tags with org.eclipse.jgit.pgm.Tag"

12 years agoAdd developers section to root POM file 97/4997/2
Kevin Sawicki [Wed, 25 Jan 2012 17:01:55 +0000 (09:01 -0800)]
Add developers section to root POM file

This section contains the names of the current committers
and is required for acceptance to the Maven Central repository

Change-Id: Ib758cfe0a574aa3e80af9d289bec1a74d9b78d25

12 years agoMove writeTrashFile and deleteFile into JGitTestUtil 82/4982/2
Dariusz Luksza [Wed, 25 Jan 2012 00:24:09 +0000 (01:24 +0100)]
Move writeTrashFile and deleteFile into JGitTestUtil

Moves RepositoryTestCase.writeThashFile, RepositoryTestCase.deleteFile
and dependencies into JGitTestUtil for further reuse.

Required-by-EGit: If8dfa0251797aca56ddc825619500dc21885ba26
Change-Id: I6fc62c8e6626f907e544b5bbe5d64e864a2c323f
Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
12 years agoAdd scm section to root POM file 84/4984/1
Kevin Sawicki [Mon, 23 Jan 2012 17:19:18 +0000 (09:19 -0800)]
Add scm section to root POM file

Change-Id: I23db67685a7b6a481961eb6ed6b4b80b2d0cace8

12 years agoReally close output stream when core.autocrlf is true 83/4983/1
Robin Rosenberg [Sun, 22 Jan 2012 23:57:39 +0000 (00:57 +0100)]
Really close output stream when core.autocrlf is true

Change-Id: I8a0d91e908145168c32589600bd1598826511ae3

12 years agoWorkaround incompatible refactoring in Jetty 7.6.0 69/4969/2
Tomasz Zarna [Fri, 20 Jan 2012 23:15:03 +0000 (00:15 +0100)]
Workaround incompatible refactoring in Jetty 7.6.0

In Jetty 7.6 package org.eclipse.jetty.http.security was renamed to
org.eclipse.jetty.util.security [1] breaking compatibility.

Compare docs for the package in 7.5.4 [2] and missing part in 7.6.0 [3].
To fix until we switch to Jetty 8, restrict the maximum version to 7.6.0
exclusive.

[1] http://dev.eclipse.org/mhonarc/lists/jetty-dev/msg01175.html
[2] http://download.eclipse.org/jetty/7.5.4.v20111024/apidocs/
[3] http://download.eclipse.org/jetty/7.6.0.RC4/apidocs/

Change-Id: I82b107ec76e66367e55e2cc20233a7924bf7be9f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
12 years agoAdd command support for listing stashed commits 50/4750/10
Kevin Sawicki [Mon, 19 Dec 2011 17:46:37 +0000 (09:46 -0800)]
Add command support for listing stashed commits

Bug: 309355
Change-Id: I34a8c251b89abcdb67565ca49bee02e5e2113593
Signe-off-by: Chris Aniszczyk <zx@twitter.com>
12 years agoMerge "Support relative submodule URLs on init/add/sync"
Matthias Sohn [Wed, 18 Jan 2012 21:26:42 +0000 (16:26 -0500)]
Merge "Support relative submodule URLs on init/add/sync"

12 years agoSupport relative submodule URLs on init/add/sync 62/4962/3
Kevin Sawicki [Tue, 17 Jan 2012 17:35:29 +0000 (09:35 -0800)]
Support relative submodule URLs on init/add/sync

Interpret submodule URLs that start with './' or '../' as
relative to either the configured remote for the HEAD branch,
or 'origin', or the parent repository working directory if no
remote URL is configured

Bug: 368536
Change-Id: Id4985824023b75cd45cd64a4dd9d421166391e10

12 years agoAdd BranchTrackingStatus for getting remote tracking status 32/4732/4
Robin Stocker [Mon, 16 Jan 2012 21:33:03 +0000 (22:33 +0100)]
Add BranchTrackingStatus for getting remote tracking status

This is used by EGit change I1e1caca561d1b0a0c194bfc42e64b698f42c6e6a to
show branch status in decoration.

It can also be used for providing the same output as C Git in "git
status".

Change-Id: I8d2b108c89905c3f0496f3d517879596740787c0
Signed-off-by: Robin Stocker <robin@nibor.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
12 years agoAdd BranchConfig helper for access to branch config section 30/4730/4
Robin Stocker [Mon, 16 Jan 2012 21:18:54 +0000 (22:18 +0100)]
Add BranchConfig helper for access to branch config section

Getting the name of the remote-tracking branch given a branch is not so
easy to get right. This class provides a way to do that and could be
used for more branch config related things (e.g. in PullCommand).

Change-Id: I896a2384217936c8b672df8b81c9599f5c350458
Signed-off-by: Robin Stocker <robin@nibor.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
12 years agoAdd RevWalkUtils with count(start, end) method 31/4731/4
Robin Stocker [Mon, 16 Jan 2012 21:05:20 +0000 (22:05 +0100)]
Add RevWalkUtils with count(start, end) method

It returns the number of commits that are in start and not in end.
Useful for calculating how much a branch is ahead of another one.

Change-Id: I09f7d9b049beea417da7ff32c9f8bf0d4ed46a7f
Signed-off-by: Robin Stocker <robin@nibor.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
12 years agoMerge "Support more of AutoCRLF"
Christian Halstrick [Mon, 16 Jan 2012 15:53:13 +0000 (10:53 -0500)]
Merge "Support more of AutoCRLF"

12 years agoFix resolution of tree when path is empty 56/4956/4
Robin Rosenberg [Sun, 15 Jan 2012 22:51:43 +0000 (23:51 +0100)]
Fix resolution of tree when path is empty

Revision strings that end with a ':' with no trailing path
should return the tree associated with the current ref parsed

Bug: 368370
Change-Id: I7c7617a77bd418bad4e570be2d1e9002ad280762
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
12 years agoMake sure all bytes are written to files on close, or get an error. 41/4841/3
Robin Rosenberg [Sun, 15 Jan 2012 10:22:52 +0000 (11:22 +0100)]
Make sure all bytes are written to files on close, or get an error.

Java's BufferedOutputStream swallows any errors that occur when flushing
the buffer in close().

This class overrides close to make sure an error during the final
flush is reported back to the caller.

Change-Id: I74a82b31505fadf8378069c5f6554f1033c28f9b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
12 years agoMerge "Resolve ~ with no trailing number as the first parent commit"
Robin Rosenberg [Sun, 15 Jan 2012 01:28:52 +0000 (20:28 -0500)]
Merge "Resolve ~ with no trailing number as the first parent commit"

12 years agoThrow API exception when LsRemoteCommand fails with TransportException 49/4949/3
Matthias Sohn [Sun, 15 Jan 2012 00:38:25 +0000 (01:38 +0100)]
Throw API exception when LsRemoteCommand fails with TransportException

In many cases applications want to handle TransportException hence
expose it as an API exception.

Change-Id: I64b885ecfb1a35bd93c89026c6298d1820ba69d0
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
12 years agoResolve ~ with no trailing number as the first parent commit 55/4955/6
Kevin Sawicki [Sat, 14 Jan 2012 23:34:18 +0000 (15:34 -0800)]
Resolve ~ with no trailing number as the first parent commit

This would previously throw a RevisionSyntaxException

Change-Id: I42b4988c7f6c6454e2ebda13914260e25ac1a889

12 years agoCannot commit -o file with only file permission change 51/4851/4
Robin Rosenberg [Sat, 7 Jan 2012 13:00:14 +0000 (14:00 +0100)]
Cannot commit -o file with only file permission change

Bug 345076
Change-Id: Ie64039793ab6ba4748731320399f03301b6282ec
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
12 years agoSupport more of AutoCRLF 30/4530/2
Robin Rosenberg [Mon, 31 Oct 2011 22:30:11 +0000 (23:30 +0100)]
Support more of AutoCRLF

This patch introduces CRLF handling to the DirCacheCheckout and
WorkingTreeIterator supporting the AutoCRLF for add, checkout
reset and status and hopefully some other places that depende
on the underlying logic of the affected API's.

The patch includes test cases for the Status command provided by
Tomasz Zarna for bug 353867.

The core.eol and core.safecrlf options are not yet supported.

Bug: 301775
Bug: 353867
Change-Id: I2280a2dc0698829475de6a662a6c6e80b1df7663

12 years agoMerge "Provide helper for unlocking a file"
Matthias Sohn [Tue, 10 Jan 2012 17:24:49 +0000 (12:24 -0500)]
Merge "Provide helper for unlocking a file"

12 years agoProvide helper for unlocking a file 08/4908/4
Kevin Sawicki [Mon, 9 Jan 2012 16:46:13 +0000 (08:46 -0800)]
Provide helper for unlocking a file

This will allow recovery from a LockFailedException where
the file associated with an exception is passed to FileUtils.unlock
to attempt an unlock on the file so the operation can be retried

Change-Id: I580166d386126bfb54a318a65253070a6e325936

12 years agoAdd setter for ProgressMonitor to DiffCommand 34/4934/2
Tomasz Zarna [Mon, 9 Jan 2012 14:48:16 +0000 (15:48 +0100)]
Add setter for ProgressMonitor to DiffCommand

Change-Id: I34f8b77a461e165d7d624dbd9a6944feadc57b8e

12 years agoMerge "Add options for setting context lines and prefixes to DiffCommand"
Stefan Lay [Mon, 9 Jan 2012 12:06:59 +0000 (07:06 -0500)]
Merge "Add options for setting context lines and prefixes to DiffCommand"

12 years agoAdd options for setting context lines and prefixes to DiffCommand 90/4890/2
Tomasz Zarna [Mon, 9 Jan 2012 11:13:12 +0000 (12:13 +0100)]
Add options for setting context lines and prefixes to DiffCommand

Change-Id: I539f3531e94c11c0f0a3e7096c0eb1b1c309898a

12 years agoMerge "Add helper for determining if status is clean"
Christian Halstrick [Mon, 9 Jan 2012 11:13:12 +0000 (06:13 -0500)]
Merge "Add helper for determining if status is clean"

12 years agoNarrow exceptions declared by LsRemoteCommand 32/4932/7
Matthias Sohn [Sun, 8 Jan 2012 21:08:08 +0000 (13:08 -0800)]
Narrow exceptions declared by LsRemoteCommand

API commands either throw GitAPIException or JGitInternalException.

Also add missing javadoc and reduce nesting of catch blocks.

Change-Id: I9a3b302e1b3f373ee11a977a0e3d6213bfbd3cdf
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Signed-off-by: Kevin Sawicki <kevin@github.com>
12 years agoMerge "Retain executable mode of existing files on Windows"
Robin Rosenberg [Sun, 8 Jan 2012 21:34:28 +0000 (16:34 -0500)]
Merge "Retain executable mode of existing files on Windows"

12 years agoMerge "Use constants from ConfigConstants in CoreConfig"
Matthias Sohn [Thu, 5 Jan 2012 15:15:55 +0000 (10:15 -0500)]
Merge "Use constants from ConfigConstants in CoreConfig"

12 years agoAdd helper for determining if status is clean 16/4916/1
Kevin Sawicki [Wed, 4 Jan 2012 00:48:01 +0000 (16:48 -0800)]
Add helper for determining if status is clean

This checks if all collections that Status exposes are
empty or not

Change-Id: I0c342ab70dc36c1fd70acb4f8a924bb207d62f47

12 years agoProvide file mode of paths in index from IndexDiff 04/4904/8
Kevin Sawicki [Tue, 3 Jan 2012 23:27:56 +0000 (00:27 +0100)]
Provide file mode of paths in index from IndexDiff

Change-Id: I1d543e2f721987114cc1e1cb0848c234470df794
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
12 years agoUse constants from ConfigConstants in CoreConfig 13/4913/1
Kevin Sawicki [Tue, 3 Jan 2012 23:24:55 +0000 (15:24 -0800)]
Use constants from ConfigConstants in CoreConfig

Change-Id: Ic1253498ecdd7545c6b1f114f4c83a3b77273874

12 years agoRetain executable mode of existing files on Windows 28/4828/14
Kevin Sawicki [Tue, 3 Jan 2012 23:07:02 +0000 (15:07 -0800)]
Retain executable mode of existing files on Windows

Currently files in a repository marked as executable will have
that mode unset when modified and committed on systems that
do not support detection of this mode since the working tree
iterator will never report this mode for any entries.

This change updates WorkingTreeIterator to be able
to determine the target file mode to be used for the index
through consideration of the configured WorkingTreeOptions.

Bug: 364956
Change-Id: Iae496baa011b8a59d9329ec73615482b03d34a5a

12 years agoAdd support for cloning submodules to CloneCommand 00/4900/7
Kevin Sawicki [Mon, 2 Jan 2012 17:38:21 +0000 (09:38 -0800)]
Add support for cloning submodules to CloneCommand

Change-Id: Ib1f82206fa14be75e2080f95db9f2d178e876453

12 years agoExtend TransportCommand in submodule add/update commands 02/4902/2
Kevin Sawicki [Mon, 2 Jan 2012 17:40:53 +0000 (09:40 -0800)]
Extend TransportCommand in submodule add/update commands

This allows all the settings of a TransportCommand to be
configured on the clone commands that are run by submodule
add/update

Change-Id: I93bfe5a91d430200de8c7f1e32a60cb990aa58ea

12 years agoAdd submodule command helpers to Git class 01/4901/1
Kevin Sawicki [Mon, 2 Jan 2012 17:34:25 +0000 (09:34 -0800)]
Add submodule command helpers to Git class

Change-Id: I649d96617072db68ab15aa2569836fa783577424

12 years agoSkip a number commits before starting to show the commit output 84/4884/9
Tomasz Zarna [Mon, 2 Jan 2012 16:40:02 +0000 (08:40 -0800)]
Skip a number commits before starting to show the commit output

Change-Id: Id2666d897d29b6371f7a6cf241cfda02964b4971
Signed-off-by: Kevin Sawicki <kevin@github.com>
12 years agoAdd constant for default name for the Git repo configuration 97/4897/2
Tomasz Zarna [Mon, 2 Jan 2012 12:24:36 +0000 (13:24 +0100)]
Add constant for default name for the Git repo configuration

Change-Id: I5a6ef686c444fb1e46c9f784bad01165471ef372
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
12 years agoSort translation bundle keys in alphabetical order. 95/4895/3
Tomasz Zarna [Mon, 2 Jan 2012 11:59:05 +0000 (12:59 +0100)]
Sort translation bundle keys in alphabetical order.

Change-Id: I83e26531ea924178ba43fa82b3c1fe02afd23eca
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
12 years agoUpdate base version for clirr API check to latest release 92/4892/1
Matthias Sohn [Fri, 30 Dec 2011 01:09:17 +0000 (02:09 +0100)]
Update base version for clirr API check to latest release

Change-Id: Icb56610241c80d6ca8a980f6d419f4934579d441
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
12 years agoAdd comand support for git-submodule 61/4861/6
Kevin Sawicki [Mon, 19 Dec 2011 17:38:11 +0000 (09:38 -0800)]
Add comand support for git-submodule

Adds the following commands:
    - Add
    - Init
    - Status
    - Sync
    - Update

This also updates AddCommand so that file patterns added that
are submodules can be staged in the index.

Change-Id: Ie5112aa26430e5a2a3acd65a7b0e1d76067dc545
Signed-off-by: Kevin Sawicki <kevin@github.com>
Signed-off-by: Chris Aniszczyk <zx@twitter.com>
12 years agoAdd commit id and parent count to exception message 20/4820/2
Kevin Sawicki [Wed, 14 Dec 2011 21:33:27 +0000 (13:33 -0800)]
Add commit id and parent count to exception message

Bug: 357312
Change-Id: I2f85cf88650594eca7df6aa0e26bea329674f08e

12 years agoMerge "Only print stack trace to Sytem.err when debug flag is set"
Shawn Pearce [Tue, 27 Dec 2011 21:24:36 +0000 (16:24 -0500)]
Merge "Only print stack trace to Sytem.err when debug flag is set"

12 years agoFix typo in RebaseResult#mySatus 85/4885/1
Tomasz Zarna [Tue, 27 Dec 2011 20:46:19 +0000 (21:46 +0100)]
Fix typo in RebaseResult#mySatus

Change-Id: I88d34eec8307231f89343ead06858d1df4ac0886

12 years agoOnly print stack trace to Sytem.err when debug flag is set 83/4883/1
Kevin Sawicki [Tue, 27 Dec 2011 17:20:03 +0000 (09:20 -0800)]
Only print stack trace to Sytem.err when debug flag is set

Bug: 362100
Change-Id: Id18de9660f0dc2fb6c30db9770f31f26c874022d

12 years agoMerge branch 'stable-1.2' 79/4879/1
Matthias Sohn [Mon, 26 Dec 2011 22:52:32 +0000 (23:52 +0100)]
Merge branch 'stable-1.2'

* stable-1.2:
  JGit v1.2.0.201112221803-r
  Expose unmerged paths when revert fails
  Enforce the use of Java5 API:s only (with a few exceptions)

Change-Id: Ib18d41a65e68cc47fb63114fcce27a16820d0692
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
12 years agoMerge "Limit the number of commits in LogCommand output"
Robin Rosenberg [Fri, 23 Dec 2011 18:28:21 +0000 (13:28 -0500)]
Merge "Limit the number of commits in LogCommand output"

12 years agoLimit the number of commits in LogCommand output 27/4827/4
Tomasz Zarna [Thu, 22 Dec 2011 11:34:01 +0000 (12:34 +0100)]
Limit the number of commits in LogCommand output

Bug: 316680
Change-Id: I88cf7aac6b5763cc94421433dd4bbd42f81e0e69

12 years agoDiffFormatter#format(List) fails unless #scan(ATI, ATI) is called first 36/4036/2
Tomasz Zarna [Thu, 18 Aug 2011 11:43:42 +0000 (13:43 +0200)]
DiffFormatter#format(List) fails unless #scan(ATI, ATI) is called first

Bug: 354919
Change-Id: I710394fe6675e0e5aa66d9118c5b10d433aa30ea

12 years agoMerge "Support getting specific entry number in reflog"
Robin Rosenberg [Thu, 22 Dec 2011 23:49:04 +0000 (18:49 -0500)]
Merge "Support getting specific entry number in reflog"

12 years agoJGit v1.2.0.201112221803-r 73/4873/1 stable-1.2 v1.2.0.201112221803-r
Matthias Sohn [Thu, 22 Dec 2011 23:12:32 +0000 (00:12 +0100)]
JGit v1.2.0.201112221803-r

Change-Id: Icc0b09324f205d93929af8cf522a99ad00cf7591
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
12 years agoRefactor ResolveMerger 66/4366/3
Christian Halstrick [Wed, 19 Oct 2011 22:33:47 +0000 (00:33 +0200)]
Refactor ResolveMerger

The places where ResolveMerger was doing content merges have been
refactored. The goal was to have one single method where content merge
was done and to factor out other topics (updating the index, updating
the working tree) into own methods. This was done to allow adding
pluggable content mergers in change
I7817e2123d254f3eeb315b47a61d2c55bd202c12

Change-Id: I8529697b197372a284bcd5ab2c9ba1adb925a520
Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
12 years agoExpose unmerged paths when revert fails 23/4823/3
Kevin Sawicki [Wed, 14 Dec 2011 22:30:00 +0000 (14:30 -0800)]
Expose unmerged paths when revert fails

Change-Id: I02678aeb31a62668ae2b0342a6dae721e043dc5e

12 years agoSupport getting specific entry number in reflog 22/4822/4
Kevin Sawicki [Mon, 19 Dec 2011 17:14:47 +0000 (09:14 -0800)]
Support getting specific entry number in reflog

The number specified is interpreted as relative to the
last entry in the reflog.

Change-Id: Ie4dd03370bb0d475a0e89d3015113ca98920100f

12 years agoAdd exception class for when locking a file fails 00/4800/2
Kevin Sawicki [Tue, 13 Dec 2011 01:49:09 +0000 (17:49 -0800)]
Add exception class for when locking a file fails

This will allows calling classes to handle lock failures
without checking against the message and will also provide
access to the file that could not be locked.

Change-Id: I95bc59e1330a7af71ae3b0485c4516299193f504

12 years agoAllow to amend commits with JGit CLI 54/4854/1
Tomasz Zarna [Sun, 18 Dec 2011 15:28:44 +0000 (16:28 +0100)]
Allow to amend commits with JGit CLI

Change-Id: I0e8d365b56e079ac4ccece7fcf80ea140c319c78

12 years agoSupport resolving integer-based reflog revisions 19/4819/4
Kevin Sawicki [Sat, 17 Dec 2011 01:05:42 +0000 (17:05 -0800)]
Support resolving integer-based reflog revisions

Revision strings such as 'master@{0}' can now be resolved
by Repository.resolve by reading the reflog for the ref and
returning the commit for the entry number specified.

This still throws an exception for cases not supported
such as 'master@{yesterday}'.

Change-Id: I6162777d6510e083565a77cac4545cda5a9aefb3

12 years agoMerge "Report diff entries for files that only change mode"
Robin Rosenberg [Fri, 16 Dec 2011 15:30:24 +0000 (10:30 -0500)]
Merge "Report diff entries for files that only change mode"

12 years agoMerge branch 'stable-1.2' 38/4838/1
Matthias Sohn [Fri, 16 Dec 2011 07:49:59 +0000 (08:49 +0100)]
Merge branch 'stable-1.2'

* stable-1.2:
  Add API checking using clirr
  Fix MergeCommandTest to pass if File.executable is not supported
  Fix ResolveMerger not to add paths with FileMode 0

Change-Id: I86e7194a40acd6dfa3d433f1d17c01bdf5bb0d9c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
12 years agoEnforce the use of Java5 API:s only (with a few exceptions) 85/4785/3
Robin Rosenberg [Fri, 16 Dec 2011 00:01:36 +0000 (01:01 +0100)]
Enforce the use of Java5 API:s only (with a few exceptions)

This only works with Eclipse 3.6 and newer and requires installation
of new package. Documentation is not very good, but there is a blog
about it here:
http://eclipseandjazz.blogspot.com/2011/10/of-invalid-references-to-system.html

API checking is especially useful on OS X where Java5 is not readily
available.

Change-Id: I3c0ad460874a21c073f5ac047146cbf5d31992b4
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
12 years agoMerge "Fix MergeCommandTest to pass if File.executable is not supported" into stable-1.2
Matthias Sohn [Thu, 15 Dec 2011 23:58:48 +0000 (18:58 -0500)]
Merge "Fix MergeCommandTest to pass if File.executable is not supported" into stable-1.2

12 years agoAdd API checking using clirr 31/4831/3
Matthias Sohn [Thu, 15 Dec 2011 23:50:46 +0000 (15:50 -0800)]
Add API checking using clirr

In order to generate API reports run: mvn clirr:clirr

The reports are generated to the folder
target/site/clirr-report.html under the respective
project.

In order to check API compatibility and fail the build
on incompatible changes run: mvn clirr:check

For now we compare the API against the latest release
1.1.0.201109151100-r.

Bug: 336849
Change-Id: I21baaf3a6883c5b4db263f712705cc7b8ab6d888
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Signed-off-by: Kevin Sawicki <kevin@github.com>
12 years agoFix MergeCommandTest to pass if File.executable is not supported 30/4830/1
Robin Rosenberg [Thu, 15 Dec 2011 22:33:00 +0000 (23:33 +0100)]
Fix MergeCommandTest to pass if File.executable is not supported

Change-Id: If11080ed6e53d9df88a1ae42f48ee8914d54669b

12 years agoReport diff entries for files that only change mode 26/4826/4
Kevin Sawicki [Thu, 15 Dec 2011 01:51:42 +0000 (17:51 -0800)]
Report diff entries for files that only change mode

This also updates DiffFormatter to not write path lines
for entries that have the same object id

Bug: 361570
Change-Id: I830a78e2babf472503630a7aa020ebfd5c7e69c6

12 years agoFire DfsPacksChangedEvents when committing packs. 07/4807/2
Dave Borowitz [Tue, 13 Dec 2011 19:00:19 +0000 (11:00 -0800)]
Fire DfsPacksChangedEvents when committing packs.

Once a pack has been committed with commitPack(), we know that the pack
list has changed but we don't re-scan the underlying storage.

Change-Id: Ia7b35df4442a5f5dfe7e817edcc77b44b5410d08

12 years agoStatusCommand#setWorkingTreeIt should return 'this' 91/4791/2
Tomasz Zarna [Mon, 12 Dec 2011 17:21:15 +0000 (09:21 -0800)]
StatusCommand#setWorkingTreeIt should return 'this'

All setters for JGit API commands return the command instance, follow
the builder pattern.

Change-Id: Id2bbc3f1300bb179887c4d2d6dd72925bde55f24
Signed-off-by: Kevin Sawicki <kevin@github.com>
12 years agoFix ResolveMerger not to add paths with FileMode 0 57/4757/7
Christian Halstrick [Fri, 9 Dec 2011 10:17:59 +0000 (11:17 +0100)]
Fix ResolveMerger not to add paths with FileMode 0

When ResolveMerger finds a path where it has to do a content merge it
will try the content merge and if that succeeds it'll add the newly
produced content to the index. For the FileMode of this new index entry
it blindly copies the FileMode it finds for that path in the common base
tree. If by chance the common base tree does not contain this path it'll
try to add FileMode 0 (MISSING) to the index.

One could argue that this can't happen: how can the ResolveMerger
successfully (with no conflicts) merge two contents if there is no
common base? This was due to another bug in ResolveMerger. It failed to
find out that for two files which differ only in the FileMode (e.g. 644
vs. 755) it should not try a content merge.

Change-Id: I7a00fe1a6c610679be475cab8a3f8aa4c08811a1
Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
12 years agoPrepare 1.3.0 builds 78/4778/1
Matthias Sohn [Fri, 9 Dec 2011 23:50:21 +0000 (00:50 +0100)]
Prepare 1.3.0 builds

Change-Id: I7a1ae73783c95041b59f047a7330e62e7f642149
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
12 years agoMerge branch 'stable-1.2' 77/4777/1
Matthias Sohn [Sat, 10 Dec 2011 00:06:47 +0000 (01:06 +0100)]
Merge branch 'stable-1.2'

* stable-1.2:
  Fix version.sh
  Throw API exception when MergeCommand hits checkout conflicts
  Add methods for configuring platform emulation
  Fix history rendering not to occupy too many lanes
  Fix History rendering

Change-Id: If71cc760423ae2b76c7435ca4830edc1745556de
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
12 years agoFix version.sh 76/4776/1
Matthias Sohn [Fri, 9 Dec 2011 23:49:39 +0000 (00:49 +0100)]
Fix version.sh

Change-Id: Icdf5d9ea3ca62839cbf7de13dfee9682056b7cef
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
12 years agoMerge "Add simple chain implementations of transport hooks and loggers"
Shawn Pearce [Fri, 9 Dec 2011 17:23:23 +0000 (12:23 -0500)]
Merge "Add simple chain implementations of transport hooks and loggers"

12 years agoAdd simple chain implementations of transport hooks and loggers 69/4769/3
Dave Borowitz [Thu, 8 Dec 2011 16:21:01 +0000 (08:21 -0800)]
Add simple chain implementations of transport hooks and loggers

Allows callers to effectively run multiple hooks and loggers without
modifying the UploadPack/ReceivePack interface.

Change-Id: I5b388816b63036ffff08ef3a9b857ccb764cb8c4

12 years agoMerge "Force jgit.sh to use UTF-8 encoding on Mac"
Shawn Pearce [Fri, 9 Dec 2011 15:11:30 +0000 (10:11 -0500)]
Merge "Force jgit.sh to use UTF-8 encoding on Mac"

12 years agoMerge changes I9f1842c2,Ie139133b
Shawn Pearce [Fri, 9 Dec 2011 15:04:03 +0000 (10:04 -0500)]
Merge changes I9f1842c2,Ie139133b

* changes:
  Throw invalid ref exception instead of invalid remote exception
  Use constant for logs directory

12 years agoMerge "Add a no-op UploadPackLogger and use it by default"
Shawn Pearce [Fri, 9 Dec 2011 02:44:18 +0000 (21:44 -0500)]
Merge "Add a no-op UploadPackLogger and use it by default"

12 years agoThrow API exception when MergeCommand hits checkout conflicts 52/4752/2
Matthias Sohn [Thu, 8 Dec 2011 22:33:53 +0000 (23:33 +0100)]
Throw API exception when MergeCommand hits checkout conflicts

When MergeCommand hit checkout conflicts it did throw an internal JGit
exception org.eclipse.jgit.errors.CheckoutConflictException instead of
org.eclipse.jgit.api.errors.CheckoutConflictException which it
declares to throw. Hence translate the internal exception to the
exception declared in the API.

Bug: 327573
Change-Id: I1efcd93a43ecbf4a40583e0fc9d8d53cffc98cae
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
12 years agoThrow invalid ref exception instead of invalid remote exception 49/4749/6
Kevin Sawicki [Tue, 6 Dec 2011 18:00:28 +0000 (10:00 -0800)]
Throw invalid ref exception instead of invalid remote exception

ReflogCommand command was throwing an incorrect exception type
when an IOException was wrapped and rethrown from the underlying
ReflogReader.  The IOException cause is now provided to the thrown
exception as well.

Change-Id: I9f1842c2d414d3e9c658843f9b448bc18891748e

12 years agoUse constant for logs directory 47/4747/4
Kevin Sawicki [Tue, 6 Dec 2011 17:37:11 +0000 (09:37 -0800)]
Use constant for logs directory

Change-Id: Ie139133bcbe1ca61c85e86b3484f858bc065821f

12 years agoMerge "Set expected old object id to all zeros when head id is null"
Shawn Pearce [Thu, 8 Dec 2011 18:09:02 +0000 (13:09 -0500)]
Merge "Set expected old object id to all zeros when head id is null"

12 years agoMerge "Use System.arraycopy to copy parent object id array"
Shawn Pearce [Thu, 8 Dec 2011 18:07:21 +0000 (13:07 -0500)]
Merge "Use System.arraycopy to copy parent object id array"

12 years agoMerge "[findBugs] Implement Serializable interface in PlotLane"
Shawn Pearce [Thu, 8 Dec 2011 18:06:03 +0000 (13:06 -0500)]
Merge "[findBugs] Implement Serializable interface in PlotLane"

12 years agoAdd toString() to HunkHeader 66/4766/2
Tomasz Zarna [Thu, 8 Dec 2011 17:11:01 +0000 (18:11 +0100)]
Add toString() to HunkHeader

Since FileHeader provides toString() method (via DiffEntry) we could add
a similar method to HunkHeader.

Change-Id: I7886e5b8f775fa8e8478ac5af37d90b6ef677d8b

12 years ago[findBugs] Implement Serializable interface in PlotLane 70/4770/1
Kevin Sawicki [Thu, 8 Dec 2011 16:41:10 +0000 (08:41 -0800)]
[findBugs] Implement Serializable interface in PlotLane

This class is referenced by PlotCommit which is Serializable

Change-Id: If79b6a593dc53fbb7c4f0a69a9d0dca02a8cb63c

12 years agoAdd a no-op UploadPackLogger and use it by default 68/4768/2
Dave Borowitz [Thu, 8 Dec 2011 16:00:39 +0000 (08:00 -0800)]
Add a no-op UploadPackLogger and use it by default

This matches the behavior of the hooks in UploadPack.

Change-Id: I21277e52ee9452237d87084f06bb140dfa6bf608

12 years agoAdd methods for configuring platform emulation 61/4761/1
Robin Rosenberg [Tue, 25 Oct 2011 23:54:54 +0000 (01:54 +0200)]
Add methods for configuring platform emulation

Specifically we support setting system properties for Windows, generic
Unix and current test platform.

Change-Id: Ib02be417c4915350dfec64fda3face1138552871

12 years agoUse System.arraycopy to copy parent object id array 59/4759/1
Kevin Sawicki [Wed, 7 Dec 2011 18:21:41 +0000 (10:21 -0800)]
Use System.arraycopy to copy parent object id array

Change-Id: Iee475584f0a65b8b77610cd277f15295b68dfe80

12 years agoSet expected old object id to all zeros when head id is null 55/4755/2
Kevin Sawicki [Wed, 7 Dec 2011 02:02:30 +0000 (18:02 -0800)]
Set expected old object id to all zeros when head id is null

This will be the case on the initial commit to a repository
and the ref update should expect a non-existent ref

Change-Id: Iaa06e47e6e8cc4a0281c7683b367d4806dd980ea

12 years agoForce jgit.sh to use UTF-8 encoding on Mac 54/4754/1
Robin Rosenberg [Tue, 6 Dec 2011 23:42:35 +0000 (00:42 +0100)]
Force jgit.sh to use UTF-8 encoding on Mac

For some obscure reason the platform encodng in Java on Macs
is MacRoman. OS X used UTF-8 as the default encoding so set
the encoding property in jgit.sh.

Change-Id: I08182c2f8512f799178cee70bcc28d6ee2b9c2b0

12 years agoFix history rendering not to occupy too many lanes 44/4744/2
Christian Halstrick [Tue, 6 Dec 2011 22:10:03 +0000 (23:10 +0100)]
Fix history rendering not to occupy too many lanes

There was a bug in history rendering which caused jgit to use too
many lanes in case lanes get repositioned. Looking at commit
90c11cbaeb83ee9b02238cbd2c0e5bcf68068772 in JGit was one example. Vadim
Dmitriev found the problem and the solution.

Bug: 365460
Change-Id: I6024265b7a593dcfd4fc612d0baf6652a0092ff4
Also-by: Vadim Dmitriev <dmgloss@mail.ru>
Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
12 years agoStream left open in WorkingTreeIterator#filterClean 45/4745/1
Tomasz Zarna [Tue, 6 Dec 2011 09:44:52 +0000 (10:44 +0100)]
Stream left open in WorkingTreeIterator#filterClean

Change-Id: I17c2709f2613536c02c9ea2977d936b87029ac0d

12 years agoMerge changes I5381e110,I5534b560
Shawn O. Pearce [Mon, 5 Dec 2011 20:38:41 +0000 (15:38 -0500)]
Merge changes I5381e110,I5534b560

* changes:
  Discard request HTTP bodies for status code <400
  Ensure all smart HTTP errors are sent to clients

12 years agoFix History rendering 35/4735/1
Christian Halstrick [Fri, 2 Dec 2011 13:27:51 +0000 (14:27 +0100)]
Fix History rendering

There was the possibility that during history rendering we draw a lane
"trough" a passed commit. Vadim Dmitriev found that out in bug 335818.
I added the needed check to that block of code where it was missing.

Bug: 335818
Change-Id: Ic944193b2aca55ff3eb0235d46afa60b7896aa0f
Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
12 years agoMerge "Always close the GZIPOutputStream to release Deflater"
Robin Rosenberg [Fri, 2 Dec 2011 22:38:05 +0000 (17:38 -0500)]
Merge "Always close the GZIPOutputStream to release Deflater"

12 years agoMerge "Fix History rendering"
Shawn Pearce [Fri, 2 Dec 2011 15:02:49 +0000 (10:02 -0500)]
Merge "Fix History rendering"

12 years agoMerge "Add percent-encoding of reserved characters in URIish"
Shawn Pearce [Fri, 2 Dec 2011 15:01:22 +0000 (10:01 -0500)]
Merge "Add percent-encoding of reserved characters in URIish"

12 years agoAdd percent-encoding of reserved characters in URIish 50/4550/8
Robin Rosenberg [Tue, 29 Nov 2011 23:16:40 +0000 (00:16 +0100)]
Add percent-encoding of reserved characters in URIish

We do this for the the names that have an explicit scheme and
do it both ways. The URIish is parsed before decoding. Only
a few special characters are encoded for the path part of the
URI, i.e. space, non-ASCII and control characters. The percent
encoding is assumed to be a stream encoding so we interpret it
as UTF-8.

Change-Id: I82d1910df9472e21d7212a2b984ff7d8fb2cbf0f

12 years agoFix History rendering 19/4719/1
Christian Halstrick [Fri, 2 Dec 2011 13:27:51 +0000 (14:27 +0100)]
Fix History rendering

There was the possibility that during history rendering we draw a lane
"trough" a passed commit. Vadim Dmitriev found that out in bug 335818.
I added the needed check to that block of code where it was missing.

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