XinTong Wang
770d36c8ba
Fix apply patch which did not work with non-ascii characters
...
Bug: 483943
Change-Id: If28f64053d20ab1bee54245f223e952dc2fe392c
Signed-off-by: XinTong Wang <xintong@ca.ibm.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years ago
Shawn Pearce
591e39bf9d
Revert "Fix warnings about unchecked conversion of MergeResult"
...
This reverts commit 979fa19110
.
Breaks API.
Change-Id: I54af657898d49f64d6906fe3edfb6b08e996d901
9 years ago
David Pursehouse
e96cb22a43
Don't use deprecated LockFile constructor
...
Change-Id: Ibc3e2f3372e1a65732dd6d3c71cec53fb1aa15e2
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
979fa19110
Fix warnings about unchecked conversion of MergeResult
...
Change-Id: I1490b2209fa7b39676849c624adbc262a672f6df
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
8deff4b969
HugeFileTest: Make Git a class member and open in try-with-resource
...
There's only one test method in this module and it's quite long, so
rather than using a try-with-resource and having to indent a huge
block of existing code, make the Git a member variable that gets
initialised and closed in @Before and @After annotated methods.
The methods are named 'before' and 'after' rather than the conventional
'setUp' and 'tearDown' so as not to conflict with the names of the
existing methods in LocalDiskRepositoryTestCase.
Change-Id: I5a4a9b59f244c450dbcae9fdde7d9e0f0cd24e6f
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
c9e61c7b39
DirCacheBasicTest: Open ObjectInserter.Formatter in try-with-resource
...
Change-Id: Ie4b3e5ad9616bc56b6d8d2476d1e6c6319c1a0aa
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
fc4ac28aa9
DirCacheBuilderIteratorTest: Open TreeWalk in try-with-resource
...
Change-Id: I94836315918924cba9a2b5be6b9ae417cb2ad215
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
0973c9fc48
DirCacheCGitCompatabilityTest: Open TreeWalk in try-with-resource
...
Change-Id: I81a8bd2aba7eb0a6efaea5d6f7720aa725052157
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
259dca06ec
DirCacheCheckoutMaliciousPathTest: Open Git and RevWalk in t-w-r
...
Change-Id: Iacb4e25f0ada74b1a01e448216cb02c7ec18b2d7
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
30c9ec88d1
DirCacheIteratorTest: Open TreeWalk instances in try-with-resource
...
Change-Id: If23597acaebf2295b85411bf87bc0292d5dc789e
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
430b777830
ForPathTest: Open TreeWalk in try-with-resource
...
Change-Id: Ie4d0eb9c0fe1d8b8f41da161e701137cd7dd178f
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
130cf0d61a
GitConstructionTest: Open Git instance in try-with-resource
...
Change-Id: Iddf658acd1c78161d6028cfcfb7e5c73534ae40b
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
f23b0fd7e6
IndexDiffTest: Open Git instances in try-with-resources
...
Change-Id: I7fa2d16561982ddfde053f2fe78135c114b66b1d
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
4d3dc41f2f
ManifestParserTest: Don't use deprecated StringBufferInputStream
...
Replace it with ByteArrayInputStream as suggested in [1].
[1] http://stackoverflow.com/a/2219543/381622
Change-Id: I5ca8d721a756a82ea5f5687a20555303eb1dfc18
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
217760fee5
IndexModificationTimesTest: Open Git instances in try-with-resource
...
Change-Id: If52c071b71f5df822b1ac276a6f665515f6c9d00
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
de73fbf597
InterIndexDiffFilterTest: Open TreeWalk in try-with-resource
...
Change-Id: Ie0046771b1ab1c9784d9a3bb597a9d76c6c3017d
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
6d33322df4
LockFileTest: Open Git instance in try-with-resource
...
Change-Id: Ie2b0e55e606f50c46e21227f23de74dbea8388e5
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
Matthias Sohn
29159f1171
JGit v4.1.2.201602141800-r
...
Change-Id: If0721109f389835a3a00b1a97559fd8f8c156556
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years ago
David Pursehouse
61bb701eeb
MergeCommandTest: Use JUnit's assume to check preconditions
...
Using the assume method, instead of just returning, will cause the
test to be marked as skipped rather than passed on systems where
the precondition is not satisfied.
Change-Id: I13672371f6cd3c481a0a6247e0eaed3aac6d766e
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
03987f980b
MergeCommandTest: Open Git instances in try-with-resource
...
Change-Id: I95074358cec6fef6b5ced7bb7b117c33fee08a7a
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
50e21322de
NoteMapTest: Open TreeWalk instances in try-with-resource
...
Change-Id: I70da0140fe087e7e69c28e9ddd125495d916ec1b
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
35ba741cd4
ObjectDirectoryTest: Fix warnings about variable hiding
...
The variable and parameter named 'db' were hiding class members
with the same name.
Change-Id: I27017afdc5f49c38c6f5be494e7a21239ea601a7
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
101ac16e8d
PackWriterTest: Open RevWalk in try-with-resource
...
Change-Id: Ic8ed941d096718e81c7ffeb166bcf7faaa2ff57d
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
53b6bb9cca
PatchIdDiffFormatterTest: Open Git and PatchIdDiffFormatter in try-with-resource
...
Change-Id: I39e898e52c3d9dffaba9dabf11c085503fbc1acf
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
f7a3643fb8
PathSuffixFilterTest: Open TreeWalk in try-with-resource
...
Change-Id: If0ee71f09a5464e27f0496dac364f8f9bb015eb6
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
a3923f6b95
PostOrderTreeWalkTest: Open TreeWalk in try-with-resource
...
Also remove unnecessary nesting in test methods.
Change-Id: Id59f8403c0a7b38ebb6b3a24814257cd59ea575d
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
ad9b326e3f
PullCommandWithRebaseTest: Open RevWalk in try-with-resource
...
Change-Id: I16f4d219e8b103d30149b2a94d3484424f3de84b
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
f3c250bd08
PushCommandTest: Open Git instances in try-with-resource
...
Change-Id: I3a8e28a4097e868a34ee1b23256c7f28d570cd75
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
83f1f8fc7c
RacyGitTests: Open NameConflictTreeWalk in try-with-resource
...
Change-Id: Ic17b05fd7d056761b352168de97efb607a289276
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
3adea9ac7f
RecursiveMergerTest: Open TreeWalk and BufferedReader in try-with-resource
...
Change-Id: I381d535eb4ed7535ba8541c5320f81ce11d5b173
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
964da41d52
ReflogConfigTest: refactor commit method to avoid variable hiding
...
The author and committer parameters were hiding class members of
the same name.
Since the passed in PersonIdent instances were being created from
the class members anyway, remove the parameters and instead create
the PersonIdent instances inline in the method.
Change-Id: I66b057df388835d57f332fdcbadb8a9f4e1094a4
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
615280ba07
RefDirectoryTest: Fix warning about member variable hiding
...
The parameter name 'totalWork' was hiding a class member variable
of the same name.
Change-Id: I646525e82900e23ffabfc756bcf5052ef873656a
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
952f381981
ReflogResolveTest: Open Git instances in try-with-resource
...
Change-Id: I11ee38bfcf4951bf05a1632df08b1d074d38338b
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
5ca9aaa172
RepoCommandTest: Open Git instances in try-with-resource
...
Change-Id: I171e84eeb7862e74761ba6c961f14c86beaba9e7
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
Ivan Motsch
975aa88685
Add Attribute Macro Expansion
...
Attributes MacroExpander implements macros used in git attributes. This
is implemented inside the TreeWalk using a lazy created MacroExpander.
In addition, the macro expander caches the global and info attributes
node in order to provide fast merge of attributes.
Change-Id: I2e69c9fc84e9d7fb8df0a05817d688fc456d8f00
Signed-off-by: Ivan Motsch <ivan.motsch@bsiag.com>
9 years ago
David Pursehouse
143ba06cd6
RepositoryResolveTest: Open Git in try-with-resource
...
Change-Id: Ibb612f3d8fd0f9913291430474311d9da62f4e6f
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
a176c6055a
ResetCommandTest: Use Git member in testHardResetAfterSquashMerge
...
Use the class member instance of the Git rather than creating
a new one in the test. This makes it consistent with the other
tests in the module.
Change-Id: Ibe822ded76a80b94922e92bbc6f5d90bcc52f8a3
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
8074f50b58
ResolveMergerTest: Open Git in try-with-resource
...
Change-Id: Ic378ec25c4a3ea4354ee643029f87e46b6449ed4
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
3c4e7c08a7
RevCommitListTest: Open Git and RevWalk in try-with-resource
...
Change-Id: I4ba273a364a12f82a3b3b06ba050bc633411daf6
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
5bfdc3341c
RevCommitParseTest: Open ObjectInserter.Formatter in try-with-resource
...
Change-Id: Iaa87c51bc19b4fa832393c11db20b69865d30d48
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
f0ef7748b4
RevObjectTest: Open RevWalk in try-with-resource
...
Change-Id: I19bcbb2f12036c5043436f3d544ccefbb7385b8d
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
44f64de091
RevTagParseTest: Open ObjectInserter.Formatter in try-with-resource
...
Change-Id: I2341977223be1dc5252492f4775626122f56496b
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
895510fc48
RevertCommandTest: Open Git in try-with-resource
...
Change-Id: I659adbb0a6f741c4c6f615c8a24b4603c3f6681e
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
d882bf8c4d
SquashMessageFormatterTest: Open git in try-with-resource
...
Change-Id: Ife94d1f0279ed3671a9bca79fb26c0403549fa17
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
6aa619ec5c
StatusCommandTest: Open Git in try-with-resource
...
Change-Id: Id13ad9fa3157d0479da12fb8184437be3ca8c948
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
96ff311049
SubmoduleAddTest: Open Git in try-with-resource
...
Change-Id: I1276ce206e891729adfa681e00952ca0ba6ffc53
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
3742946a03
SymlinksTest: Open git and TreeWalk in try-with-resource
...
Change-Id: I0fd1933e843375029fa795447b688f23a893f84b
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
d0d3773763
T0003_BasicTest: Open autocloseable types in try-with-resource
...
FileRepository and ObjectInserter.Formatter are autocloseable, so
use try-with-resource for these.
Remove suppression of unused variable warning that is no longer
necessary.
Change-Id: I270829f0a4030083c9599eb5785b0145dc590ed8
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
a82f5c7425
TreeFilterTest: Open TreeWalk in try-with-resource
...
Change-Id: If100a66e544926bcffe9a9a0b31bfd4806902864
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
62637584d8
TreeWalkJava7Test: Open TreeWalk in try-with-resource
...
Change-Id: I99a483c482b5395653b0d57b368ec1b5fdba450c
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago