]> source.dussan.org Git - jgit.git/log
jgit.git
9 years agoMerge branch 'stable-3.6' 31/38931/1
Matthias Sohn [Sun, 4 Jan 2015 01:18:27 +0000 (02:18 +0100)]
Merge branch 'stable-3.6'

* stable-3.6:
  Prepare 3.6.2-SNAPSHOT builds
  JGit v3.6.1.201501031845-r
  Trim author/committer name and email in commit header
  Rename detection should canonicalize line endings
  PathMatcher should respect "assumeDirectory" flag

Change-Id: Idd48c6d94cf1ab09abc07f70d50890b1b78e1833
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years agoPrepare 3.6.2-SNAPSHOT builds 30/38930/1
Matthias Sohn [Sun, 4 Jan 2015 00:19:35 +0000 (01:19 +0100)]
Prepare 3.6.2-SNAPSHOT builds

Change-Id: I9699d84af2d4b5382d8ee88ed3517d6b91305421
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years agoJGit v3.6.1.201501031845-r 27/38927/1 v3.6.1.201501031845-r
Matthias Sohn [Sat, 3 Jan 2015 23:46:52 +0000 (00:46 +0100)]
JGit v3.6.1.201501031845-r

Change-Id: I56e235a271f90ea2d8cdb7d99706f726d4a59c43
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years agoTrim author/committer name and email in commit header 13/38913/1
Rüdiger Herrmann [Fri, 17 Oct 2014 11:05:41 +0000 (13:05 +0200)]
Trim author/committer name and email in commit header

C Git trims name and email before inserting them into the commit header
so that " A U Thor  " and "  author@example.com " becomes
"A U Thor <author@example.com>" with a single separating space.

This changes PersonIdent#toExternalString() to trim name and email
before concatenating them.

Change-Id: Idd77b659d0db957626824f6632e2da38d7731625
Signed-off-by: Rüdiger Herrmann <ruediger.herrmann@gmx.de>
9 years agoRename detection should canonicalize line endings 12/38912/1
Marc Strapetz [Thu, 30 Oct 2014 18:36:49 +0000 (19:36 +0100)]
Rename detection should canonicalize line endings

Native Git canonicalizes line endings when detecting
renames, more specifically it replaces CRLF by LF.
See: hash_chars in diffcore-delta.c

Bug: 449545
Change-Id: Iec2aab12ae9e67074cccb7fbd4d9defe176a0130
Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years agoAdd .mailmap to correct Shawn and Saša's log entries 32/37332/2
Shawn Pearce [Sun, 30 Nov 2014 18:34:36 +0000 (10:34 -0800)]
Add .mailmap to correct Shawn and Saša's log entries

Both myself and Saša Živkov have been using different names
and email addresses in the JGit history. Configure .mailmap
to map to consistent entries for us.

Saša Živkov's entries were taken from the Gerrit Code Review
.mailmap file.

Change-Id: I3fad123c453c3a1e2972ae0616757fd34b003165

9 years agoPathMatcher should respect "assumeDirectory" flag 93/38793/1
Andrey Loskutov [Sun, 14 Dec 2014 17:07:59 +0000 (18:07 +0100)]
PathMatcher should respect "assumeDirectory" flag

The path matcher should not fail if the rule ends with trailing slash,
target pattern does not ends with the slash and the "assumeDirectory"
flag is set.

E.g. */bin/ should also match a/bin if this pattern is threated as
directory by WorkingTreeIterator (FileMode.TREE).

The old code/tests have never tested directory rules with patterns
*without* trailing slashes but with the "assumeDirectory" flag set.
Unfortunately this is exactly what WorkingTreeIterator does... The tests
are changed to test *both* cases now (with trailing slash and without)
if the target pattern has trailing slash (represents directory).

Bug: 454672
Change-Id: I621c1644d9e94df3eb9f6f09c6de0fe51f0950a4
Also-by: Markus Duft <markus.duft@salomon.at>
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
9 years agoCompare API changes against 3.6.0 92/38792/1
Matthias Sohn [Sun, 28 Dec 2014 00:53:19 +0000 (01:53 +0100)]
Compare API changes against 3.6.0

Change-Id: I70d2e3f37d02a688436999844884510c2eb5cbda
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years agoPrepare 3.7.0-SNAPSHOT builds 49/38749/2
Matthias Sohn [Wed, 24 Dec 2014 00:10:23 +0000 (01:10 +0100)]
Prepare 3.7.0-SNAPSHOT builds

Change-Id: Ib3e7b5f46ee1e27b9cf25b3b2d01d681a5c4904c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years agoMerge branch 'stable-3.6' 48/38748/1
Matthias Sohn [Wed, 24 Dec 2014 00:08:58 +0000 (01:08 +0100)]
Merge branch 'stable-3.6'

* stable-3.6:
  Prepare 3.6.1-SNAPSHOT builds
  JGit v3.6.0.201412230720-r
  [pgm] Add option --bare to clone command
  [pgm] Implement clone using CloneCommand
  Fix junit tests under windows when the platform is explicitly changed
  Fix unit tests for windows by explicitly closing test repos
  [pgm] Add option --tags for ls-remote
  [pgm] Add option --heads for ls-remote
  [pgm] Use LsRemoteCommand to implement ls-remote and add a test

Change-Id: I8f31e76cb7e9416919f37e02c7e51ab1d221df40
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years agoPrepare 3.6.1-SNAPSHOT builds 45/38745/1
Matthias Sohn [Tue, 23 Dec 2014 22:38:20 +0000 (23:38 +0100)]
Prepare 3.6.1-SNAPSHOT builds

Change-Id: Ie620c90ffafbffc6755b4e1ed55a61a15b118a2a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years agoJGit v3.6.0.201412230720-r 13/38713/2 v3.6.0.201412230720-r
Matthias Sohn [Tue, 23 Dec 2014 12:20:53 +0000 (13:20 +0100)]
JGit v3.6.0.201412230720-r

Change-Id: Ic28e2bbbdb1099e948c64a005c39f6b8d8ac69a8
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years ago[pgm] Add option --bare to clone command 81/37381/8
Matthias Sohn [Thu, 4 Dec 2014 00:47:21 +0000 (01:47 +0100)]
[pgm] Add option --bare to clone command

Change-Id: I528491e3e20d3c9ebe37fe3cd2bf85b4644d8698
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years ago[pgm] Implement clone using CloneCommand 26/37526/7
Matthias Sohn [Thu, 4 Dec 2014 00:43:23 +0000 (01:43 +0100)]
[pgm] Implement clone using CloneCommand

Change-Id: I56699b7bf9a71f673cb308d3015f51de5b06c1d9
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years agoMerge "Fix junit tests under windows when the platform is explicitly changed" into...
Matthias Sohn [Mon, 22 Dec 2014 14:29:43 +0000 (09:29 -0500)]
Merge "Fix junit tests under windows when the platform is explicitly changed" into stable-3.6

9 years agoMerge "[pgm] Add option --tags for ls-remote" into stable-3.6
Christian Halstrick [Mon, 22 Dec 2014 14:25:15 +0000 (09:25 -0500)]
Merge "[pgm] Add option --tags for ls-remote" into stable-3.6

9 years agoMerge "[pgm] Add option --heads for ls-remote" into stable-3.6
Christian Halstrick [Mon, 22 Dec 2014 14:23:24 +0000 (09:23 -0500)]
Merge "[pgm] Add option --heads for ls-remote" into stable-3.6

9 years agoFix junit tests under windows when the platform is explicitly changed 67/38667/5
Christian Halstrick [Mon, 22 Dec 2014 10:19:22 +0000 (11:19 +0100)]
Fix junit tests under windows when the platform is explicitly changed

SystemReader used a chached ObjectChecker which was instantiated only
once. But in case of unit tests where we can change the platform
dynamically (e.g. MockSystemReader.setWindows()) this is wrong and
caused DirCacheCheckoutMaliciousPathTest.
testMaliciousAbsoluteCurDrivePathWindowsOnUnix() to fail. This change
allows
user of SystemReader to force the creation of a new ObjectChecker.
MockSystemReader.setWindows() and .setUnix() make use of this feature.

Change-Id: I87458d1dc63c1f5c18979f972b1c1f0d670a9ed8

9 years agoMerge "[pgm] Use LsRemoteCommand to implement ls-remote and add a test" into stable-3.6
Christian Halstrick [Mon, 22 Dec 2014 11:49:33 +0000 (06:49 -0500)]
Merge "[pgm] Use LsRemoteCommand to implement ls-remote and add a test" into stable-3.6

9 years agoFix unit tests for windows by explicitly closing test repos 66/38666/1
Christian Halstrick [Mon, 22 Dec 2014 09:13:41 +0000 (10:13 +0100)]
Fix unit tests for windows by explicitly closing test repos

Change-Id: If5f67d739f744f19b45e6f5c7597a213fd5bf025

9 years agoMerge branch 'stable-3.6' 75/38575/1
Shawn Pearce [Fri, 19 Dec 2014 15:57:55 +0000 (07:57 -0800)]
Merge branch 'stable-3.6'

* stable-3.6: (26 commits)
  JGit v3.5.3.201412180710-r
  JGit v3.4.2.201412180340-r
  ObjectChecker: Disallow names potentially mapping to ".git" on HFS+
  ObjectChecker: Disallow Windows shortname "GIT~1"
  ObjectChecker: Disallow ".git." and ".git<space>"
  Always ignore case when forbidding .git in ObjectChecker
  DirCache: Refuse to read files with invalid paths
  DirCache: Replace isValidPath with DirCacheCheckout.checkValidPath
  Replace "a." with "a-" in unit tests
  Support the new repository layout for submodules
  Allow explicit configuration of git directory in CloneCommand
  Allow explicit configuration of git directory in InitCommand
  Fix tests on windows by closing repos
  RepoCommand should close opened repos
  Fix LocalDiskRepositoryTestCase to create correct type of repos
  Prevent NPE if ref can't be resolved when executing ReflogCommand
  Fix DirCacheCheckout to set correct file length if core.autocrlf=true
  CheckoutCommand: Fix checking out ours/theirs when no base stage exists
  Make sure modifications to config-param trustFolderStat are detected
  Apache HttpClientConnection: replace calls to deprecated LocalFile()
  ...

Change-Id: Ife6f21d64a148dbb0d0d9055356b1568188806fe

9 years agoMerge "Implement FileSnapshot.toString() to help debugging"
Shawn Pearce [Fri, 19 Dec 2014 15:55:24 +0000 (10:55 -0500)]
Merge "Implement FileSnapshot.toString() to help debugging"

9 years agoMerge branch 'stable-3.5' into stable-3.6 23/38523/1
Matthias Sohn [Thu, 18 Dec 2014 23:17:54 +0000 (00:17 +0100)]
Merge branch 'stable-3.5' into stable-3.6

* stable-3.5:
  JGit v3.5.3.201412180710-r
  JGit v3.4.2.201412180340-r
  ObjectChecker: Disallow names potentially mapping to ".git" on HFS+
  ObjectChecker: Disallow Windows shortname "GIT~1"
  ObjectChecker: Disallow ".git." and ".git<space>"
  Always ignore case when forbidding .git in ObjectChecker
  DirCache: Refuse to read files with invalid paths
  DirCache: Replace isValidPath with DirCacheCheckout.checkValidPath
  Replace "a." with "a-" in unit tests
  Apache HttpClientConnection: replace calls to deprecated LocalFile()
  Fix two nits about DirCacheEntry constructors
  Detect buffering failures while writing rebase todo file
  Deprecate TemporaryBuffer.LocalFile without parent directory
  Switch FileHeader.extractFileLines to TemporaryBuffer.Heap
  AmazonS3: Buffer pushed pack content under $GIT_DIR
  DirCache: Buffer TREE extension to $GIT_DIR

Change-Id: Iee8acbaa9d4d9047b550641db1b8845d64530785
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years agoJGit v3.5.3.201412180710-r stable-3.5 v3.5.3.201412180710-r
Matthias Sohn [Thu, 18 Dec 2014 14:23:10 +0000 (15:23 +0100)]
JGit v3.5.3.201412180710-r

Change-Id: Iadbd460da494c04fba71f98c200d6b65ce1709c6
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years agoMerge branch 'stable-3.4' into stable-3.5
Matthias Sohn [Thu, 18 Dec 2014 14:18:07 +0000 (15:18 +0100)]
Merge branch 'stable-3.4' into stable-3.5

* stable-3.4:
  JGit v3.4.2.201412180340-r
  ObjectChecker: Disallow names potentially mapping to ".git" on HFS+
  ObjectChecker: Disallow Windows shortname "GIT~1"
  ObjectChecker: Disallow ".git." and ".git<space>"
  Always ignore case when forbidding .git in ObjectChecker
  DirCache: Refuse to read files with invalid paths
  DirCache: Replace isValidPath with DirCacheCheckout.checkValidPath
  Replace "a." with "a-" in unit tests
  Apache HttpClientConnection: replace calls to deprecated LocalFile()
  Fix two nits about DirCacheEntry constructors
  Detect buffering failures while writing rebase todo file
  Deprecate TemporaryBuffer.LocalFile without parent directory
  Switch FileHeader.extractFileLines to TemporaryBuffer.Heap
  AmazonS3: Buffer pushed pack content under $GIT_DIR
  DirCache: Buffer TREE extension to $GIT_DIR

Change-Id: I398cf40b006a05a6537788fc6eb1f84df1ed8814
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years agoJGit v3.4.2.201412180340-r stable-3.4 v3.4.2.201412180340-r
Matthias Sohn [Thu, 18 Dec 2014 08:36:19 +0000 (09:36 +0100)]
JGit v3.4.2.201412180340-r

Change-Id: Ie088cf129b04ec64738edbc8c3ce25aa43b557ca
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years agoObjectChecker: Disallow names potentially mapping to ".git" on HFS+
Matthias Sohn [Mon, 15 Dec 2014 13:42:04 +0000 (14:42 +0100)]
ObjectChecker: Disallow names potentially mapping to ".git" on HFS+

Mac's HFS+ folds concatentations of ".git" and ignorable Unicode
characters [1] to ".git" [2]. Hence we need to disallow all names which
could potentially be a shortname for ".git". Example: in an empty
directory create a folder ".g\U+200Cit". Now you can't create another
folder ".git".

The following characters are ignorable Unicode which are ignored on
HFS+:

unicode   hex         name
-------------------------------------------------
U+200C    0xe2808c    ZERO WIDTH NON-JOINER
U+200D    0xe2808d    ZERO WIDTH JOINER
U+200E    0xe2808e    LEFT-TO-RIGHT MARK
U+200F    0xe2808f    RIGHT-TO-LEFT MARK
U+202A    0xe280aa    LEFT-TO-RIGHT EMBEDDING
U+202B    0xe280ab    RIGHT-TO-LEFT EMBEDDING
U+202C    0xe280ac    POP DIRECTIONAL FORMATTING
U+202D    0xe280ad    LEFT-TO-RIGHT OVERRIDE
U+202E    0xe280ae    RIGHT-TO-LEFT OVERRIDE
U+206A    0xe281aa    INHIBIT SYMMETRIC SWAPPING
U+206B    0xe281ab    ACTIVATE SYMMETRIC SWAPPING
U+206C    0xe281ac    INHIBIT ARABIC FORM SHAPING
U+206D    0xe281ad    ACTIVATE ARABIC FORM SHAPING
U+206E    0xe281ae    NATIONAL DIGIT SHAPES
U+206F    0xe281af    NOMINAL DIGIT SHAPES
U+FEFF    0xefbbbf    ZERO WIDTH NO-BREAK SPACE

[1] http://www.unicode.org/versions/Unicode7.0.0/ch05.pdf#G40025
    http://www.unicode.org/reports/tr31/#Layout_and_Format_Control_Characters
[2] http://dubeiko.com/development/FileSystems/HFSPLUS/tn1150.html#UnicodeSubtleties

Change-Id: Ib6a1dd090b2649bdd8ec16387c994ed29de2860d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years agoObjectChecker: Disallow Windows shortname "GIT~1"
Christian Halstrick [Wed, 17 Dec 2014 13:36:52 +0000 (14:36 +0100)]
ObjectChecker: Disallow Windows shortname "GIT~1"

Windows creates shortnames for all non-8.3 files (see [1]). Hence we
need to disallow all names which could potentially be a shortname for
".git". Example: in an empty directory create a folder "GIT~1". Now you
can't create another folder ".git".

The path "GIT~1" may map to ".git" on Windows. A potential victim to
such an attack first has to initialize a git repository in order to
receive any git commits. Hence the .git folder created by init will get
the shortname "GIT~1". ".git" will only get a different shortname if the
user has created a file "GIT~1" before initialization of the git
repository.

[1] http://en.wikipedia.org/wiki/8.3_filename

Change-Id: I9978ab8f2d2951c46c1b9bbde57986d64d26b9b2
Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years agoObjectChecker: Disallow ".git." and ".git<space>"
Shawn Pearce [Mon, 1 Dec 2014 23:01:07 +0000 (15:01 -0800)]
ObjectChecker: Disallow ".git." and ".git<space>"

Windows treats "foo." and "foo " as "foo". The ".git" directory is
special, as it contains metadata for a local Git repository. Disallow
variations that Windows considers to be the same.

Change-Id: I28eb48859a95a89111b4987c91de97557e3bb539

9 years agoAlways ignore case when forbidding .git in ObjectChecker
Shawn Pearce [Mon, 24 Nov 2014 18:27:49 +0000 (10:27 -0800)]
Always ignore case when forbidding .git in ObjectChecker

The component name ".GIT" inside a tree entry could confuse a
case insensitive filesystem into looking at a submodule and
not a directory entry.

Disallow any case permutations of ".git" to prevent this
confusion from entering a repository and showing up at a
later date on a case insensitive system.

Change-Id: Iaa3f768931d0d5764bf07ac5f6f3ff2b1fdda01b

9 years agoDirCache: Refuse to read files with invalid paths
Shawn Pearce [Tue, 25 Nov 2014 19:43:32 +0000 (11:43 -0800)]
DirCache: Refuse to read files with invalid paths

If the DirCache contains a path that is known to be invalid, refuse to
read the DirCache into memory.  This avoids confusing errors later if
an invalid path read from the DirCache were to be passed into a new
DirCacheEntry constructor.

Change-Id: Ic033d81e23a5fbd554cc4dff80a232504562ffa8

9 years agoDirCache: Replace isValidPath with DirCacheCheckout.checkValidPath
Shawn Pearce [Tue, 25 Nov 2014 08:47:48 +0000 (00:47 -0800)]
DirCache: Replace isValidPath with DirCacheCheckout.checkValidPath

isValidPath is an older simple form of the validation performed by
checkValidPath. Use the latter as it more consistently matches
git-core's validation rules.

By running the same validation as fsck, callers creating an entry
for the DirCache are more likely to learn early they are trying
to build trees that will fail fsck.

Change-Id: Ibf5ac116097156aa05c18e231bc65c0854932eb1

9 years agoReplace "a." with "a-" in unit tests
Shawn Pearce [Sat, 29 Nov 2014 04:37:18 +0000 (20:37 -0800)]
Replace "a." with "a-" in unit tests

Windows does not like naming files "a.".  The trailing "." may be
dropped by the filesystem, which is confusing.  Even though these
tests currently do not write to disk, future tests like them might.

Replace "." with "-", which has the same sorting properties that
were desirable about ".", but does not have the same limitations.

Change-Id: Ie5b7594bf5e79828d1341883c73ddb70123d5055

9 years ago[pgm] Add option --tags for ls-remote 84/37384/3
Matthias Sohn [Sun, 23 Nov 2014 23:52:45 +0000 (00:52 +0100)]
[pgm] Add option --tags for ls-remote

Bug: 444072
Change-Id: I52b470924609fc201e078d9d232aad257506728d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years ago[pgm] Add option --heads for ls-remote 83/37383/3
Matthias Sohn [Sun, 23 Nov 2014 23:41:39 +0000 (00:41 +0100)]
[pgm] Add option --heads for ls-remote

TODO: find a way to use option -h which is already captured by
TextBuiltin's option --help which also uses the alias -h.

Bug: 444072
Change-Id: Ie66584c2fc7fc224014a43cf928547703dd9d213
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years ago[pgm] Use LsRemoteCommand to implement ls-remote and add a test 82/37382/2
Matthias Sohn [Sun, 23 Nov 2014 22:57:51 +0000 (23:57 +0100)]
[pgm] Use LsRemoteCommand to implement ls-remote and add a test

Change-Id: Ic266f844c23e2519df5770ca56284b26e4cfe1f4
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years agoSupport the new repository layout for submodules 82/37982/4
Christian Halstrick [Wed, 10 Dec 2014 16:54:28 +0000 (17:54 +0100)]
Support the new repository layout for submodules

When updating a submodule (e.g. during recursive clone) the repository
for the submodule should be located at <gitdir>/modules/<submodule-path>
whereas the working tree of the submodule should be located at
<working-tree>/<submodule-path> (<gitdir> and <working-tree> are
associated to the containing repository). Since CloneCommand has learned
about specifying a separate gitdir this is easy to implement in
SubmoduleUpdateCommand.

Change-Id: I9b56a3dfa50f97f6975c2bb7c97b36296f331b64

9 years agoAllow explicit configuration of git directory in CloneCommand 81/37981/4
Christian Halstrick [Wed, 10 Dec 2014 16:45:52 +0000 (17:45 +0100)]
Allow explicit configuration of git directory in CloneCommand

This feature is needed to support the new submodule layout where the
.git folder of the submodules is under .git/modules/<submodule>.

Change-Id: If5f13426cfd09b7677e23478e9700c8c25a6dae5

9 years agoAllow explicit configuration of git directory in InitCommand 33/37833/7
Christian Halstrick [Wed, 10 Dec 2014 16:42:42 +0000 (17:42 +0100)]
Allow explicit configuration of git directory in InitCommand

Native git's "init" command allows to specify the location of the .git
folder with the option "--separate-git-dir". This allows for example to
setup repositories with a non-standard layout. E.g. .git folder under
/repos/a.git and the worktree under /home/git/a. Both directories
contain pointers to the other side: /repos/a.git/config contains
core.worktree=/home/git/a . And /home/git/a/.git is a file containing
"gitdir: /repos/a.git". This commit adds that option to InitCommand.
This feature is needed to support the new submodule layout where the
.git folder of the submodules is under .git/modules/<submodule>.

Change-Id: I0208f643808bf8f28e2c979d6e33662607775f1f

9 years agoMerge "Revert "Extract path info from requests without decoding""
Shawn Pearce [Fri, 12 Dec 2014 23:51:47 +0000 (18:51 -0500)]
Merge "Revert "Extract path info from requests without decoding""

9 years agoRevert "Extract path info from requests without decoding" 79/38179/1
Shawn Pearce [Fri, 12 Dec 2014 21:53:18 +0000 (16:53 -0500)]
Revert "Extract path info from requests without decoding"

This reverts commit 19f869996f27adf59ec507e5f565d8b5619576f3.
Leaving path info encoded confuses applications like Gitiles.
Trying to fix this inside of JGit was maybe the wrong solution.

Change-Id: I8df9ab6233ff513e427701c8a1a66022c19784eb

9 years agoMerge "Fix tests on windows by closing repos" into stable-3.6
Matthias Sohn [Fri, 12 Dec 2014 13:50:20 +0000 (08:50 -0500)]
Merge "Fix tests on windows by closing repos" into stable-3.6

9 years agoFix tests on windows by closing repos 76/38076/2
Christian Halstrick [Thu, 11 Dec 2014 22:25:09 +0000 (23:25 +0100)]
Fix tests on windows by closing repos

Without explicitly closing repos we can't delete the test repositories
on windows.

Change-Id: Id5fa17bd764cbf28703c2f21639d7e969289c2d6
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years agoMerge "Prevent NPE if ref can't be resolved when executing ReflogCommand" into stable-3.6
Christian Halstrick [Fri, 12 Dec 2014 13:31:16 +0000 (08:31 -0500)]
Merge "Prevent NPE if ref can't be resolved when executing ReflogCommand" into stable-3.6

9 years agoRepoCommand should close opened repos 77/38077/2
Christian Halstrick [Thu, 11 Dec 2014 23:34:31 +0000 (00:34 +0100)]
RepoCommand should close opened repos

RepoCommand opend two repos without closing them or returning them to
the caller. This caused certain tests to fail on Windows.

Change-Id: Ia04924aaaad4d16f883b06404c2a85d3f801231f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years agoFix LocalDiskRepositoryTestCase to create correct type of repos 74/38074/2
Christian Halstrick [Thu, 11 Dec 2014 23:59:06 +0000 (00:59 +0100)]
Fix LocalDiskRepositoryTestCase to create correct type of repos

In one place LocalDiskRepositoryTestCase was ignoring the specification
whether to create a bare or non-bare repository. Fix this and fix also
one test which fails now because bare repos don't write reflogs by
default.

Change-Id: I4bcf8cf97c5b46e2f3919809eaa121a8d0e47010
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years agoPrevent NPE if ref can't be resolved when executing ReflogCommand 25/38125/1
Matthias Sohn [Fri, 12 Dec 2014 12:02:27 +0000 (13:02 +0100)]
Prevent NPE if ref can't be resolved when executing ReflogCommand

If the specified ref can't be resolved we should throw a
RefNotFoundException instead of an NPE.

Bug: 455005
Change-Id: I6ec9bf1c0f330eea5eb8277268f62663bdf58f66
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years agoMerge "Fix DirCacheCheckout to set correct file length if core.autocrlf=true" into...
Christian Halstrick [Fri, 12 Dec 2014 09:57:30 +0000 (04:57 -0500)]
Merge "Fix DirCacheCheckout to set correct file length if core.autocrlf=true" into stable-3.6

9 years agoMerge "CheckoutCommand: Fix checking out ours/theirs when no base stage exists" into...
Christian Halstrick [Fri, 12 Dec 2014 09:54:46 +0000 (04:54 -0500)]
Merge "CheckoutCommand: Fix checking out ours/theirs when no base stage exists" into stable-3.6

9 years agoFix DirCacheCheckout to set correct file length if core.autocrlf=true 02/37702/3
Matthias Sohn [Sat, 6 Dec 2014 01:59:34 +0000 (02:59 +0100)]
Fix DirCacheCheckout to set correct file length if core.autocrlf=true

To update the file length stat we need to use the length of the
temporary file since it's not yet renamed to the target file name here.
The incorrect file length stat update was introduced in
a606dc363d0f6b09e4527cca6b645d3cb1ec407d.

Bug: 453962
Change-Id: I715c048227553efae6f8f6b6878c0f04f2609d9c
Also-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de>
Also-by: Christian Halstrick <christian.halstrick@sap.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years agoAWTPlotRenderer: use float arithmetic instead of double followed by a conversion 94/37994/1
Jonathan Nieder [Wed, 10 Dec 2014 23:22:08 +0000 (15:22 -0800)]
AWTPlotRenderer: use float arithmetic instead of double followed by a conversion

Multiplying by 0.9 and converting back to float is slightly more
complicated and achieves the same effect as multiplying by the float
0.9f directly.

Change-Id: I555863bb1251badee8887b9b93c5463eda0a3509
Signed-off-by: Jonathan Nieder <jrn@google.com>
9 years agoMerge "Extract path info from requests without decoding"
Shawn Pearce [Wed, 10 Dec 2014 17:06:42 +0000 (12:06 -0500)]
Merge "Extract path info from requests without decoding"

9 years agoCheckoutCommand: Fix checking out ours/theirs when no base stage exists 24/37324/2
Robin Stocker [Sun, 30 Nov 2014 10:20:26 +0000 (21:20 +1100)]
CheckoutCommand: Fix checking out ours/theirs when no base stage exists

In case of an add/add conflict, no base stage exists. The previous
implementation would skip over the entries because the condition
expected the base stage to always exist.

Change-Id: Ie2b3685d958c09b241991b74e6177401e8a1ebc9
Signed-off-by: Robin Stocker <robin@nibor.org>
9 years agoExtract path info from requests without decoding 25/37325/7
David Pletcher [Sat, 1 Nov 2014 21:34:18 +0000 (14:34 -0700)]
Extract path info from requests without decoding

Gitiles malfunctions in conjunction with jgit and guice
because of a recent Guice bug fix. Work around the problem
by parsing the URI directly, bypassing the unescaping
performed by the getPathInfo method.

This rest of this message is copied from
https://gerrit-review.googlesource.com/#/c/60820/ :

The fix for Guice issue #745[1] causes getPathInfo() within the
GuiceFilter to return decoded values, eliminating the difference
between "foo/bar" and "foo%2Fbar". This is in spec with the servlet
standard, whose javadoc for getPathInfo[2] states that the return
value be "decoded by the web container".

Work around this by extracting the path part directly from the request
URI, which is unmodified by the container. This is copying the Guice
behavior prior to the bugfix.

[1] https://github.com/google/guice/issues/745
[2] http://docs.oracle.com/javaee/7/api/javax/servlet/http/HttpServletRequest.html#getPathInfo()

Change-Id: I7fdb291bda377dab6160599ee537962d5f60f1e8
Signed-off-by: David Pletcher <dpletcher@google.com>
9 years agoBuild with Tycho 0.22. 46/37846/1
Alexander Kurtakov [Tue, 9 Dec 2014 13:10:08 +0000 (15:10 +0200)]
Build with Tycho 0.22.

Change-Id: I32444e926179827be31d9201a6bbc5d514672110
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
9 years agoDo not use deprecated tasks in maven-antrun-plugin. 42/37842/1
Alexander Kurtakov [Tue, 9 Dec 2014 12:48:42 +0000 (14:48 +0200)]
Do not use deprecated tasks in maven-antrun-plugin.

Maven-antrun-plugin deprecated tasks in favor of target, this patch
fixes JGit poms to do the same.

Change-Id: I420fd2ce88c61cf8e786ed45fbb8235dc30c124e
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
9 years agoImplement FileSnapshot.toString() to help debugging 01/37701/1
Matthias Sohn [Sat, 6 Dec 2014 00:09:02 +0000 (01:09 +0100)]
Implement FileSnapshot.toString() to help debugging

Change-Id: Ic18d051327e491d5834929ff7fa28381f0f972c4
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years agoMake sure modifications to config-param trustFolderStat are detected 58/37658/1
Christian Halstrick [Fri, 5 Dec 2014 13:39:18 +0000 (14:39 +0100)]
Make sure modifications to config-param trustFolderStat are detected

ObjectDirectory.searchPacksAgain() should always read trustFolderStat
from the config and not rely on a cached value.

Change-Id: I90edbaae3c64eea0c9894d05acde4267991575ee

9 years agoMerge "Honor git-core meaning of receive.denyDeletes allowing tag deletion"
Matthias Sohn [Sun, 30 Nov 2014 00:18:31 +0000 (19:18 -0500)]
Merge "Honor git-core meaning of receive.denyDeletes allowing tag deletion"

9 years agoHonor git-core meaning of receive.denyDeletes allowing tag deletion 64/36964/2
Shawn Pearce [Tue, 25 Nov 2014 00:40:54 +0000 (16:40 -0800)]
Honor git-core meaning of receive.denyDeletes allowing tag deletion

receive.denyDeletes parameter refers only to branch:
http://thread.gmane.org/gmane.comp.version-control.git/99746

Bug: 412640
Change-Id: Ief3fa6abc0c9a18ba0a671ff9854432cec480c4f

9 years agoMove checkPath from DirCacheCheckout to ObjectChecker 14/37314/1
Shawn Pearce [Tue, 25 Nov 2014 05:43:59 +0000 (21:43 -0800)]
Move checkPath from DirCacheCheckout to ObjectChecker

The bulk of the "is this sane" logic is inside of ObjectChecker.  The
only caller for the version in DirCacheCheckout is an obtuse usage for
the static isValidRefName() method in Repository.

Deprecate the weird single use method in DirCacheCheckout and move all
code for checking a sequence of path components into ObjectChecker,
where it makes sense alongside the existing code that checks a single
component at a time.

Reuse a single ObjectChecker for the local platform, to avoid looking
up the system properties on each path string considered.

Change-Id: Iae6e769f2bfcad05c166e70ff255f9cf9fcdc87e

9 years agoUse baseline instead of centerline in PlotRenderer 03/37303/2
Michael Keppler [Fri, 28 Nov 2014 20:21:59 +0000 (21:21 +0100)]
Use baseline instead of centerline in PlotRenderer

If the text extent height of a to be rendered plot line is odd, then the
SWTPlotRenderer cannot calculate the correct Y position for drawing the
label and draws the label with a 1 pixel offset. SWT text drawing uses
the baseline as Y coordinate. Due to the given centerline API in the
AbstractPlotRenderer the overall calculation of the baseline for SWT is
effectively (height / 2) * 2, thereby rounding all odd heights downward
to the next even number.

This change pushes the division by 2 from the caller into the
implementations of drawText. A corresponding change will be pushed in
the egit repository.

Bug: 450813
Change-Id: I66f4e71873bb8e6f936fde573bbe4c35fe23a022
Signed-off-by: Michael Keppler <michael.keppler@gmx.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years agoConsider parent rules if ignore rule is negated 95/35295/7
Andrey Loskutov [Wed, 22 Oct 2014 07:31:42 +0000 (09:31 +0200)]
Consider parent rules if ignore rule is negated

The change tries to make jgit behave more like native CLI git regarding
the negation rules. According to [1] "... prefix "!" which negates the
pattern; any matching file excluded by a previous pattern will become
included again." Negating the pattern should not automatically make the
file *not ignored* - other pattern rules have to be considered too.

The fix adds test cases for both bugs 448094 and 407475.

[1] https://www.kernel.org/pub/software/scm/git/docs/gitignore.html

Bug: 448094
Bug: 407475
Change-Id: I322954200dd3c683e3d8f4adc48506eb99e56ae1
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years agoResolveMerger: Use checkoutEntry during abort 17/37217/1
Shawn Pearce [Wed, 26 Nov 2014 00:14:33 +0000 (16:14 -0800)]
ResolveMerger: Use checkoutEntry during abort

The cleanUp path is trying to restore files that previously were
clean, but were overwritten in the work tree by a partial merge
attempt that has failed and needs to be aborted. Reuse the checkout
logic to write the file content and refresh the stat data.

Change-Id: I320d33b3744daf88d3155db99e957408937ddd00

9 years agoCleanup double stat update of symlinks in DirCacheCheckout 16/37216/1
Shawn Pearce [Tue, 25 Nov 2014 23:10:41 +0000 (15:10 -0800)]
Cleanup double stat update of symlinks in DirCacheCheckout

When writing a symlink the stat data should only be written once
into the DirCacheEntry, based on the symlink itself and not the
possibly resolved destination observed by java.io.File.

Refactor the code to handle symlinks and early return.  This
removes the risk the blob stat info update is used against a
newly checked out symlink.

Hoist the file length stat update immediately after writing
the file, before a rename. This eliminates any race caused by another
process updating the file length after the rename and having it to
fall into the racily clean path.

Change-Id: I978ad9719c018ce1cf26947efbabaa8b9dff2217

9 years agoDeprecate checkoutEntry variant that accepts File 15/37215/1
Shawn Pearce [Tue, 25 Nov 2014 21:49:22 +0000 (13:49 -0800)]
Deprecate checkoutEntry variant that accepts File

Entries should only be written to the working tree managed by the
Repository. Simplify callers by passing only the entry and computing
the work tree location inside of the checkoutEntry method.

Change-Id: I574e41280d0407f1853fda12f4bd0d30f75d74e7

9 years agoDirCacheCheckout: create only one ObjectReader 14/37214/1
Shawn Pearce [Mon, 24 Nov 2014 19:38:09 +0000 (11:38 -0800)]
DirCacheCheckout: create only one ObjectReader

This deprecated method accidentally creates two ObjectReader
instances. Use the instance created one line above that is
correctly released in the finally block.

Change-Id: Ic57d041674611802a9384d8fa1d292e821055019

9 years agoMerge changes Icf0970dd,Ice5ec10a into stable-3.4
Christian Halstrick [Wed, 26 Nov 2014 12:54:07 +0000 (07:54 -0500)]
Merge changes Icf0970dd,Ice5ec10a into stable-3.4

* changes:
  Fix two nits about DirCacheEntry constructors
  Detect buffering failures while writing rebase todo file

9 years agoApache HttpClientConnection: replace calls to deprecated LocalFile() 42/37042/1
Matthias Sohn [Wed, 26 Nov 2014 00:35:59 +0000 (01:35 +0100)]
Apache HttpClientConnection: replace calls to deprecated LocalFile()

Change-Id: I79f422e004f386b3f2875de6997e5a0949fff566

9 years agoFix two nits about DirCacheEntry constructors 69/36969/3
Shawn Pearce [Tue, 25 Nov 2014 05:06:30 +0000 (21:06 -0800)]
Fix two nits about DirCacheEntry constructors

Explicitly pass STAGE_0 when creating a DirCacheEntry from String.
This matches the immediate next constructor that accepts the int
stage argument better, making the code easier to read.

Fix a weird line break where the comma was orphaned by itself.

Change-Id: Icf0970dd02a63877f9e41b51b982b0265e8b8887

9 years agoDetect buffering failures while writing rebase todo file 68/36968/3
Shawn Pearce [Tue, 25 Nov 2014 04:51:07 +0000 (20:51 -0800)]
Detect buffering failures while writing rebase todo file

By routing writes through SafeBufferedOutputStream the caller can be
alerted to any flush at close failures while writing or appending to
the rebase todo script.

Switch the character encoding to be done at the line granularity, as
this is sufficiently long enough that encoding overheads will not be a
bottleneck, but short enough that the amount of temporary data will
not cause memory problems for the JVM.

Change-Id: Ice5ec10a7cbadc58486d481b92940056f9ffc43a

9 years agoDeprecate TemporaryBuffer.LocalFile without parent directory 31/37031/1
Shawn Pearce [Tue, 25 Nov 2014 17:53:57 +0000 (09:53 -0800)]
Deprecate TemporaryBuffer.LocalFile without parent directory

Encourage callers to explicitly name a directory to hold any
overflow data. Call sites have more information about what is
going into the buffer and how it should be protected at the
filesystem level than just throwing content to the system wide
temporary directory.

Callers that still really don't care (or need to care) can pass
null for the File argument to have the system directory used.

Change-Id: I89009bbee49d3850d42cd82c2c462e51043acda0

9 years agoSwitch FileHeader.extractFileLines to TemporaryBuffer.Heap 30/37030/1
Shawn Pearce [Tue, 25 Nov 2014 17:58:45 +0000 (09:58 -0800)]
Switch FileHeader.extractFileLines to TemporaryBuffer.Heap

File contents are processed into a single byte[] for character
conversion. The data must fit entirely in memory, so avoid any
file IO.

Change-Id: I3fe8be2e5f37d5ae953596dda1ed3fe6d4f6aebc

9 years agoAmazonS3: Buffer pushed pack content under $GIT_DIR 29/37029/1
Shawn Pearce [Tue, 25 Nov 2014 17:54:58 +0000 (09:54 -0800)]
AmazonS3: Buffer pushed pack content under $GIT_DIR

This applies the same filesystem permissions as the source objects.
Users may override in properties files using the tmpdir value.

Change-Id: I3ec332cf41f12eae246cfaee9fd792c52cb2908b

9 years agoDirCache: Buffer TREE extension to $GIT_DIR 66/36966/2
Shawn Pearce [Tue, 25 Nov 2014 04:05:34 +0000 (20:05 -0800)]
DirCache: Buffer TREE extension to $GIT_DIR

Increase the in-memory buffer for the TREE extension to 5 MiB, and
overflow to $GIT_DIR instead of /tmp.  Using a larger buffer reduces
the chances a repository will overflow and need to spool the extension
to disk.  Using $GIT_DIR allows the TREE extension contents to have
the same file system protections as the final $GIT_DIR/index.

Wrap the entire thing in a try/finally to ensure the temp file is
deleted from disk after the block has finished using it. To avoid
dangling NFS files, LocalFile.destroy() does close the local file
before deleting it.

Change-Id: I8f871181a4689e3ebf0cdd4fd1769333cf7546c3

9 years agoSupport DfsRepository from GarbageCollectCommand 65/36965/2
Shawn Pearce [Tue, 25 Nov 2014 00:49:22 +0000 (16:49 -0800)]
Support DfsRepository from GarbageCollectCommand

Bug: 406379
Change-Id: I7f4f23cd50d46ffcde69d6abfe3ca0cc6fa86604

9 years agoAllow configurable ObjectCheckers in fetch 62/36962/1
Shawn Pearce [Mon, 24 Nov 2014 22:51:09 +0000 (14:51 -0800)]
Allow configurable ObjectCheckers in fetch

RecievePack already honors fsck settings for safeForWindows and
safeForMacOS.  Allow those same checks to be performed during fetch
through a caller-configurable ObjectChecker.

Default the fetch fsck options to match the current platform, as
it can be reasonably assumed the repository will be accessed here.

Change-Id: I3c0f411fad209c6bd8fb9c4acf5c55a6799a6a2a

9 years agoMerge changes If5b8bb91,Ib57fba6c
Matthias Sohn [Mon, 24 Nov 2014 21:16:39 +0000 (16:16 -0500)]
Merge changes If5b8bb91,Ib57fba6c

* changes:
  Cleanup TreeWalk creation/release inside StashApplyCommand
  Deprecate checkoutEntry without ObjectReader

9 years agoCleanup TreeWalk creation/release inside StashApplyCommand 58/36958/1
Shawn Pearce [Mon, 24 Nov 2014 19:51:32 +0000 (11:51 -0800)]
Cleanup TreeWalk creation/release inside StashApplyCommand

The TreeWalk constructor doesn't throw in a meaninful way that
requires cleanup of the not-yet-created TreeWalk.

Hoist the constructor outside of the try/finally and remove the
now unnecessary != null check during the finally.

Change-Id: If5b8bb91562715df0699726648123a47426b9850

9 years agoDeprecate checkoutEntry without ObjectReader 57/36957/1
Shawn Pearce [Mon, 24 Nov 2014 19:38:09 +0000 (11:38 -0800)]
Deprecate checkoutEntry without ObjectReader

Callers should manage the ObjectReader, as this allows the JGit library to cache
context relevant information across files checked out at the same time. If the
caller only has one file to checkout, it should still explicitly manage the life
span of the ObjectReader.

Change-Id: Ib57fba6cb4b774ccff8c416ef4d32e2b390f16a9

9 years agoDelete .eclipse_iplog 27/36927/1
Matthias Sohn [Mon, 24 Nov 2014 13:48:38 +0000 (14:48 +0100)]
Delete .eclipse_iplog

We don't use this file anymore since a long time since IP log
generation has been automated at the Eclipse foundation.

Change-Id: I36dd5291d53d06af6a3378c0229c1908e153caae
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years agoSet permission bits for "executable" attribute according to the umask 66/31766/9
Andrey Loskutov [Fri, 15 Aug 2014 15:27:15 +0000 (17:27 +0200)]
Set permission bits for "executable" attribute according to the umask

Bug: 424395
Change-Id: I3f5c55dd4c084529af2319029305ba2e174e0636
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years agoupload-pack: send symbolic refs as capabilities 24/36824/5
Yuxuan 'fishy' Wang [Thu, 20 Nov 2014 23:50:24 +0000 (15:50 -0800)]
upload-pack: send symbolic refs as capabilities

cgit has this feature for some time. This will teach JGit to send symbolic refs,
too.

Change-Id: I7cb2ab4e6d31a838a0af92eac64535fdb66ed74a
Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
9 years agoDefine version of javadoc plugin used to generate site 14/36614/2
Matthias Sohn [Tue, 18 Nov 2014 10:02:17 +0000 (11:02 +0100)]
Define version of javadoc plugin used to generate site

This silences the Maven warning "'reporting.plugins.plugin.version' for
org.apache.maven.plugins:maven-javadoc-plugin is missing"

Change-Id: I036210fefb6bd81ca04fcd91aaba0f9d0c1e8862
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years agoInclude the java7 feature in org.eclipse.jgit.feature 10/36410/2
Matthias Sohn [Thu, 13 Nov 2014 14:46:13 +0000 (15:46 +0100)]
Include the java7 feature in org.eclipse.jgit.feature

This way we no longer need to advertise it in the release train and can
uncategorize the jgit features without making it harder for users to
find and install the java7 feature.

Bug: 451276
Change-Id: I4c7dd0e1609fc1939d8ea83c01251dec59c228a3
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years agoDon't use java.util.regex for two simple wildcard cases 44/36144/3
Andrey Loskutov [Fri, 7 Nov 2014 15:30:44 +0000 (16:30 +0100)]
Don't use java.util.regex for two simple wildcard cases

To improve ignore parser performance we can avoid using java.util.regex
code on simple wildcard patterns with leading or trailing asterisk. As
those patterns represent a majority of ignore rules, the index diff
performance can be drastically increased on huge repository with lot of
ignore rules.

Bug: 450466
Change-Id: I80428441cc8d5de5468813f841d89322413eed8b
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years agoMerge "Fix variable name and error message for sideband testing"
Shawn Pearce [Thu, 13 Nov 2014 21:50:59 +0000 (16:50 -0500)]
Merge "Fix variable name and error message for sideband testing"

9 years agoLet RepositoryBuilder find bare repos 28/36128/2
Christian Halstrick [Fri, 7 Nov 2014 12:15:11 +0000 (13:15 +0100)]
Let RepositoryBuilder find bare repos

BaseRepositoryBuilder.findGitDir() was not searching correctly for bare
repositories. E.g. when running org.eclipse.jgit.pgm.Log and the current
directory was that of a bare git repository an error "fatal: error:
can't find git directory" was raised. With this fix RepositoryBuilder
will also check whether the given directory is the root of a bare
repository.

Bug: 450193
Change-Id: I4d4ad42e24ca397745adb0f3385caee3bcf3a186
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years agoPrepare post 3.6.0-m1 builds 68/36368/1
Matthias Sohn [Wed, 12 Nov 2014 17:51:27 +0000 (18:51 +0100)]
Prepare post 3.6.0-m1 builds

Change-Id: Ie9927de64fa6b7d517f96b8cd12e57541f284ff2
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years agoJGit v3.6.0.201411121045-m1 40/36340/1 v3.6.0.201411121045-m1
Matthias Sohn [Wed, 12 Nov 2014 15:41:54 +0000 (16:41 +0100)]
JGit v3.6.0.201411121045-m1

Change-Id: I9d789113d88cbbbdbabb8919f80c805aa4ba86fe
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years agoMerge branch 'stable-3.5' 29/36329/1
Matthias Sohn [Wed, 12 Nov 2014 14:06:19 +0000 (15:06 +0100)]
Merge branch 'stable-3.5'

* stable-3.5:
  Prepare 3.5.3-SNAPSHOT builds
  JGit v3.5.2.201411120430-r
  Don't use SSL anymore to avoid POODLE attack

Change-Id: Icc8404a94512aae36da83baafb8b10422b7bbf7b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years agoPrepare 3.5.3-SNAPSHOT builds 18/36318/2
Matthias Sohn [Wed, 12 Nov 2014 10:20:57 +0000 (11:20 +0100)]
Prepare 3.5.3-SNAPSHOT builds

Change-Id: Ia37eb66a0deaf6e86a726b1b12eaea25416d4a36
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years agoJGit v3.5.2.201411120430-r 09/36309/1 v3.5.2.201411120430-r
Matthias Sohn [Wed, 12 Nov 2014 09:38:44 +0000 (10:38 +0100)]
JGit v3.5.2.201411120430-r

Change-Id: I217d25ee712cbde52bc9319ef1dd15d2f571d37a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years agoIntroduce config parameter core.trustfolderstat 58/36058/2
Christian Halstrick [Thu, 6 Nov 2014 16:58:01 +0000 (17:58 +0100)]
Introduce config parameter core.trustfolderstat

JGit's ObjectDirectory implements the optimization that it remembers the
pack folders (.git/objects/pack) lastModified timestamp and doesn't
check for new packfiles in this folder if the lastModified attribute has
not changed.
In environments using NFS this can cause trouble. If multiple JGit
instances from multiple machines work on the same repository and one
instance creates a new ref and a new packfile (e.g. by doing a fetch)
then the other machines may detect the new ref but can't resolve the
referenced object because it doesn't detect that pack folder has a new
packfile. That's because NFS may cache file/folder metadata for quite a
long time and the pack folders modification time is not updated although
a new packfile is there and could be read.

The new config parameter core.trustfolderstat controls this behaviour.
The default is true and jgits behaviours is unchanged. But if this
parameter is set to false then jgit doesn't trust the pack directories
lastmodified anymore. Instead it will always iterate through the content
of that folder to detect new packfiles.

Change-Id: Ie3b4e92933286aa9916070a22422e629b3147f54
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years agoFix javadoc formatting in ConfigConstants 01/36301/1
Matthias Sohn [Tue, 11 Nov 2014 23:38:45 +0000 (00:38 +0100)]
Fix javadoc formatting in ConfigConstants

Change-Id: I6ae39b874a3c1fa9e1cda235ff137c9eb8dd359f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years agoFix variable name and error message for sideband testing 96/35996/3
Stefan Beller [Tue, 11 Nov 2014 02:18:34 +0000 (18:18 -0800)]
Fix variable name and error message for sideband testing

Actually the test only allows a range from [1,255], so let's name the
variable so.

Change-Id: Iecdb8149b83389c67e3cd2f64f4a654c175475be
Signed-off-by: Stefan Beller <sbeller@google.com>
9 years agoExpand wildcard imports to specfic classes 51/36251/1
Shawn Pearce [Mon, 10 Nov 2014 23:35:20 +0000 (15:35 -0800)]
Expand wildcard imports to specfic classes

JGit style is to import exactly the classes required, and never
to use "import foo.*" as the foo package could add new classes
in the future which are conflicting/confusing with the imports
already used by a source file.

Change-Id: I5693408c777e5843ec65fff1163d5d717849fa34

9 years agoFix possible NPE in IndexDiff when not all submodules are cloned 91/36191/2
Christian Halstrick [Sat, 8 Nov 2014 17:46:25 +0000 (18:46 +0100)]
Fix possible NPE in IndexDiff when not all submodules are cloned

The latest changes to IndexDiff just assumed that all configured
submodules are allways cloned. If a configured submodule did not exist
an exception was thrown. This is fixed by this commit.

Bug: 450567
Change-Id: Iabe3b196d998c19483082e5720038ebddaeb1890

9 years agoAdd missing @since tags 90/36190/2
Christian Halstrick [Sat, 8 Nov 2014 17:29:01 +0000 (18:29 +0100)]
Add missing @since tags

Change-Id: Ia657e46b9abc8c8640f63f6ff579b2f8f2b01de4

9 years ago4.4 target platform should use Luna repository 05/36205/1
Matthias Sohn [Sun, 9 Nov 2014 20:55:39 +0000 (21:55 +0100)]
4.4 target platform should use Luna repository

Change-Id: I54cdfb5699f87bf86b0434aff0b9618e57a80757
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>