Commit Graph

2444 Commits

Author SHA1 Message Date
George C. Young ab99b78ca0 Implement recursive merge strategy
Extend ResolveMerger with RecursiveMerger to merge two tips
that have up to 200 bases.

Bug: 380314
CQ: 6854
Change-Id: I6292bb7bda55c0242a448a94956f2d6a94fddbaa
Also-by: Christian Halstrick <christian.halstrick@sap.com>
Signed-off-by: Chris Aniszczyk <zx@twitter.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-02-22 23:51:50 +01:00
Colby Ranger 95ef1e83d0 Fix off by one error in PackReverseIndex.
The last 32bit offset is at Integer.MAX_VALUE.

Change-Id: Idee8be3c7887e1d0c8339ff94aceff36dbf000db
2013-02-20 22:59:35 -08:00
Matthias Sohn c033f016c9 Merge branch 'stable-2.3'
* stable-2.3:
  Prepare 2.3.2-SNAPSHOT builds
  JGit v2.3.1.201302201838-r
  Accept Change-Id even if footer contains not well-formed entries
  Fix false positives in hashing used by PathFilterGroup

Change-Id: I5882aa3b482d6bcd40a45bed51e5ab03f018a5bc
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-02-21 02:34:17 +01:00
Matthias Sohn 49ec6c1b3b Prepare 2.3.2-SNAPSHOT builds
Change-Id: I51a8a53194928416b1aef1f3fce0ce66aadceca4
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-02-21 02:13:15 +01:00
Matthias Sohn 63dceceb0e JGit v2.3.1.201302201838-r
Change-Id: I0d79873137ad4042ecc2a0210fe1f6305608b851
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-02-21 01:00:08 +01:00
Matthias Sohn 301df23d9b Merge "Accept Change-Id even if footer contains not well-formed entries" into stable-2.3 2013-02-20 18:35:44 -05:00
Stefan Lay 3b41fcbd96 Accept Change-Id even if footer contains not well-formed entries
Instead of only looking for a Change-Id in the last section if it 
consists only of well-formed "key: value" lines replace the last
occurrence of a valid Change-Id line in the last section. Some tools
require footer lines e.g. without a colon.

Gerrit doesn't accept Change-Id lines in the footer if the Change-Id
line doesn't start at the beginning of the line.

Bug: 400818
Change-Id: Icce54872adc8c566994beea848448a2f7ca87085
Signed-off-by: Stefan Lay <stefan.lay@sap.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-02-20 23:49:43 +01:00
Robin Stocker 5d7b722f6e Fix false positives in hashing used by PathFilterGroup
The ByteArraySet failed to check the length of the entry correctly leading
to matches where no match should be.

Bug: 401249
Change-Id: I925bc48d9cafcdf13e1a797bb09fc2555eb270c5
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
2013-02-20 00:37:57 +01:00
Robin Rosenberg 6cadceee16 Must use double single quotes around parameters
Change-Id: I34da782e6b9a492e3e291b36ef82f06ce8347660
2013-02-16 10:54:52 -05:00
Robin Rosenberg 29546877b1 Add the --branch flag to the jgit clone command
--branch or -b allows the user to specify which branch to checkout after
clone.

Change-Id: Ie27533e5ecb43097862a8337a27a742b501e17a5
2013-02-16 10:38:54 -05:00
Matthias Sohn ae57189712 Merge "Prepare 2.4.0-SNAPSHOT builds" 2013-02-13 19:00:11 -05:00
Matthias Sohn ba6ae0c7ec Prepare 2.4.0-SNAPSHOT builds
Change-Id: I4ab2baeb5d598d40d5dadfccdfe75152a1b9b7bf
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-02-14 00:59:25 +01:00
Robin Rosenberg 0e4c74fdf6 Merge "Cleanup unused imports" 2013-02-13 18:39:27 -05:00
Robin Rosenberg 9ac9f13c15 Cleanup unused imports
Change-Id: I7fe51f4a6187c32c917b2f503d6b50d0d6b28a61
2013-02-14 00:34:15 +01:00
Matthias Sohn da59df358b Remove unused imports
These imports are unused since commit
cb349da017

Change-Id: I74ea2a17bf4976d9c74255500e5deeff18208e87
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-02-14 00:08:46 +01:00
Matthias Sohn 647acec3d9 Merge branch 'stable-2.3'
* stable-2.3:
  Prepare post 2.3.0.201302130906 builds
  JGit v2.3.0.201302130906
  Replace explicit version by property where possible
  Add better documentation to DirCacheCheckout
  Prepare post 2.3rc1 builds
  JGit v2.3.0.201302060400-rc1

Change-Id: I5a7626014dc38e7623937a4241dbf8a6db05c1f9
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-02-13 23:12:40 +01:00
Matthias Sohn 9a5f4b46cc Prepare post 2.3.0.201302130906 builds
Change-Id: Ia11b4000557d0cf235c4e33cda4539cab25fef47
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-02-13 23:08:30 +01:00
Robin Rosenberg c0cfcc76e0 Merge "Remove unused availableRefs local from Clone.guessHEAD" 2013-02-13 16:46:29 -05:00
Matthias Sohn 19d6cadeff JGit v2.3.0.201302130906
Change-Id: If2e5fcbc01c2a7f058ef13d60b0bba5f77300d52
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-02-13 15:24:41 +01:00
Matthias Sohn 3f8ac550e8 Replace explicit version by property where possible
Change-Id: Ibb3b983d01133fd98477d9284118d8220846f0e9
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-02-13 15:22:36 +01:00
Jonathan Nieder cb349da017 Remove unused availableRefs local from Clone.guessHEAD
This variable has been populated and never used ever since it was
introduced in v0.4.9~336 (Add "jgit clone", 2008-12-23).  Remove it
to make the function easier to understand.

Change-Id: Idb7eb80bc236a20f7385ad2d6141b4d1c5c3f1cc
2013-02-12 16:29:24 -08:00
Robin Rosenberg 8a9074fe21 Implement core.checkstat = minimal
There is a huge performance issue when using both JGit (EGit) and Git
because JGit does not fill all dircache stat fields with the values Git
would expect. As a result thereof Git would typically revalidate a large
number of tracked files. This can take several minutes for large
repositories with many large files.

Since 1.8.2 Git will restrict stat checking to the size and whole second
part of the modification time stamp, if core.statinfo is set to
"minimal".

As JGit checks only size and modification time this is close to what
JGit already does. To make the match perfect ignore the sub-second part
of the modification time stamp if core.statinfo = minimal.

Change-Id: I8eaff1858a891571075a86db043f9d80da3d7503
2013-02-10 17:29:58 +01:00
Dave Borowitz 51d0e1f26e Fix Config.fromText to not skip a last line with no newline
Change-Id: Id6da6ff19296410806282bb7419fd8455e8c5475
2013-02-08 11:36:50 -08:00
Robin Rosenberg 3a4ebc0c24 Really handle annotated tags in MergeCommand
Repository.peel() must be called to ensure a tag is really peeled.

Change-Id: I83e25f09fad3ad55a3ffe41ab4758f249b7ac9f9
2013-02-08 07:27:37 +01:00
Christian Halstrick 1c4ee41dc0 Add better documentation to DirCacheCheckout
Change-Id: I282b702d9e4cb19063d8e9503604538f80e955b7
Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
2013-02-07 00:05:39 +01:00
Matthias Sohn e9cf705c6e Prepare post 2.3rc1 builds
Change-Id: I5c7daa5a735bfc2ecb9adc11c392b94d235102b6
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-02-06 16:10:20 +01:00
Matthias Sohn ea060dd8e7 JGit v2.3.0.201302060400-rc1
Change-Id: Id1f1d174375f7399cee4c2eb23368d4dbb4c384a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-02-06 14:12:51 +01:00
Robin Stocker 60d538fe51 Add getConflictingNames to RefDatabase
This has the same logic as isNameConflicting, but instead of only
returning a boolean, it returns a collection of names that conflict.

It will be used in EGit to provide a better message to the user when
validating a ref name, see Ibea9984121ae88c488858b8a8e73b593195b15e0.

Existing implementations of isNameConflicting could be rewritten like
this:

  return !getConflictingNames(name).isEmpty();

But I'm not sure about that, as isNameConflicting can be implemented in
a faster way than getConflictingNames.

Change-Id: I11e0ba2f300adb8b3612943c304ba68bbe73db8a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-02-06 08:48:54 +01:00
Robin Rosenberg 767be14f34 Move base test classes to the junit bundle for reuse for Java 7 tests
Change-Id: Iedb54eb9d8396bc3ae66d8754c1527fd9ca655f9
2013-02-04 07:24:56 +01:00
Robin Rosenberg aae08070c6 Merge "Extract method to output the first header line of a git diff" 2013-02-02 15:06:22 -05:00
Tobias Pfeifer 2c40482d0f Fixed problems occuring when changing user in gerrit configuration
Bug: 399238
Change-Id: I255634bc9b3681f292190051daed22a4771d6e57
Signed-off-by: Tobias Pfeifer <to.pfeifer@sap.com>
2013-02-01 16:05:31 +01:00
Matthias Sohn dcddaa943e Update to latest orbit release
Update 3rd party dependencies to respective latest approved version.

args4j 2.0.21 is not yet available on Maven central, hence compile
against 2.0.12 and package 2.0.21 until 2.0.21 has been published on
Maven central.

Change-Id: I41a34485970af41b4b5b2404e3d29c98979ddb48
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-01-31 16:05:46 -05:00
Robin Rosenberg 75c011cd20 Remove PathFilterGroupTest2
The test is not very useful for regression testing in its current form

Change-Id: I19d1a29ff693397ac795d414b83411f32fae56d8
2013-01-30 21:03:01 +01:00
Robin Rosenberg 69123920dd Remove debug printouts from PathFilterGroupTest
Change-Id: I4767e53efafe48d447ebe399fb2f8617072950ea
2013-01-30 19:46:19 +01:00
Robin Rosenberg 878e78b307 Fix stash apply using merge logic
Instead of the complicated strange stuff, implement staah
apply as cherry-pick.

Provided there are no conflicts and it is requested that
the index should be applied, perform yet another cherry-pick,
but discard tha results thereof it that would result in conflicts.

Bug: 376035
Change-Id: I553f3a753e0124b102a51f8edbb53ddeff2912e2
2013-01-30 11:38:19 -05:00
Tobias Pfeifer 0d09b1cab7 Extract method to output the first header line of a git diff
In order to be able to determine the range of the first header line
(e.g. "diff --git a/file1 b/file2") in subclasses, the code that formats
the first header line is extracted.

Required by egit's change: Ia61398146c0336ab332234f24d341561292554db

Change-Id: I9dd5eb964ed8b6869745c3162159b7425ac2c44a
Signed-off-by: Tobias Pfeifer <to.pfeifer@sap.com>
2013-01-30 13:27:50 +01:00
Matthias Sohn 404de6563d Merge "Align execution environment with JRE on the classpath in jgit.ant.test" 2013-01-29 12:05:29 -05:00
Robin Rosenberg eb60932930 Fix Check for FF_ONLY merges again
Added more FF-mode tests

Change-Id: I33eed5737d9411cc1cf214da62ce719916a1b736
2013-01-29 08:05:00 +01:00
Robin Rosenberg 83032e9f66 Merge "Check for FF_ONLY merges correctly" 2013-01-28 19:02:18 -05:00
Robin Rosenberg ee413067fd Merge changes Ife0cc2da,If38507ef
* changes:
  Speed up PathFilterGroup for large sets of paths
  Add test case for PathFilterGroup
2013-01-28 19:00:00 -05:00
Robin Rosenberg 642ff2cd7d Check for FF_ONLY merges correctly
Bug: 398192
Change-Id: I1253c0ea0632185bbf9f77e32f13ba5842a6e18e
2013-01-29 00:48:56 +01:00
Tomasz Zarna 96dc4207ef Align execution environment with JRE on the classpath in jgit.ant.test
Change-Id: Ic11ddce81dbcc7d703742c7e86941d2f43668617
2013-01-28 21:00:34 +01:00
Matthias Sohn 33bc4f7c05 Merge changes I25204d9e,Ia10d76e9
* changes:
  Attempt to stabilize GCTest
  Attempt to stabilize FileTreeIterator test on Windows
2013-01-24 15:57:11 -05:00
Robin Rosenberg e522d95a51 Attempt to stabilize GCTest
File system time stamps and System.currentTimeMillis() may not
necessarily be running on the same clock so add some slack.

Bug: 396662
Change-Id: I25204d9e3181e15368da2902447518c6ce205017
2013-01-23 08:27:12 +01:00
Robin Rosenberg db34152794 Attempt to stabilize FileTreeIterator test on Windows
My guess is that the higher resolution of timestamps provided by Java on
Windows causes this test to occasionally fail.

Bug: 396662
Change-Id: Ia10d76e95fe6156c7ad05972619160e461606805
2013-01-23 07:55:28 +01:00
Colby Ranger aa2db859ea Merge "Reduce memory held and speed up DfsGarbageCollector." 2013-01-22 18:55:36 -05:00
Colby Ranger 7fbd6588be Reduce memory held and speed up DfsGarbageCollector.
getObjectList() returns a list of ObjectToPack. These can hold on to a
lot of memory. Furthermore, binary searching for objects in a sorted
array can be slow. Improve the speed and reduce the memory by creating a
copy of the ObjectId and inserting it into an ObjectIdOwnerMap.

Change-Id: Ib5aa5b7447e05938b47fa55812a87b9872c20ea7
2013-01-22 15:25:15 -08:00
Robin Stocker 75ddf2a0f4 Enable marking entries using TreeFilters in DiffEntry
This adds a new optional TreeFilter[] argument to DiffEntry.scan. All
filters will be checked during the scan to determine if an entry should
be "marked" with regard to that filter.

After having called scan, the user can then call isMarked(int) on the
entries to find out whether they matched the TreeFilter with the passed
index.

An example use case for this is in the file diff viewer of EGit's
History view, where we'd like to highlight entries that are matching the
current filter.

See EGit change I03da4b38d1591495cb290909f0e4c6e52270e97f.

Bug: 393610
Change-Id: Icf911fe6fca131b2567514f54d66636a44561af1
Signed-off-by: Robin Stocker <robin@nibor.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-01-23 00:24:54 +01:00
Matthias Sohn 35d4749011 Add new committers
Change-Id: I5ef1edb8efc4668ef4731094ea6dbbcaf200195d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-01-23 00:03:20 +01:00
Matthias Sohn db5aa8d8b2 Update to jsch 0.1.46
Change-Id: Ib7eb1ff175e3f9763653b0b0432b8ddc6b1c8938
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-01-23 00:03:20 +01:00