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
Matthias Sohn
536db18cc6
Implement SHA-256 abstraction
...
The Large File Storage extension specified by GitHub [1] uses SHA-256 to
compute the ID of large files stored by the extension. Hence implement a
SHA-256 abstraction similar to the SHA-1 abstraction used by JGit.
[1] https://git-lfs.github.com/
Bug: 470333
Change-Id: I3a95954543c8570d73929e55f4a884b55dbf1b7a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years ago
Hugo Arès
df904a4227
Fix diff for added and removed submodule
...
Since If13f7b406, submodule difference are shown as a hunk. The issue
was that added and removed submodule were considered as Edit.REPLACE
instead of Edit.INSERT and Edit.DELETE in the DiffFormatter result.
Change-Id: I4330c2aa3f10e29d7d6b0b2e5286e59293a06239
Signed-off-by: Hugo Arès <hugo.ares@ericsson.com>
9 years ago
David Pursehouse
06bf69d8ca
DirCacheCheckoutTest: Open Git and TreeWalk in try-with-resource
...
Change-Id: Icc8eda841e6a437e1acf3438525014e7c46d5eb2
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
d4ddb6fc2b
ApplyCommandTest: Open Git in try-with-resource
...
Also, add missing braces around if-block.
Change-Id: I9390b2c7d5c4507923b6f06271a070dc868534e5
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
5c84145fd0
PackFileTest: Open ObjectInserter.Formatter in try-with-resource
...
Change-Id: I9c56b5efdb9c13b929073a786092a707fca21281
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
Mike Williams
48ad6842fc
Allow deletion of HEAD ref if the repository is bare.
...
Change-Id: I2281d818c9f76019e7e053e89b20214f2d663957
Signed-off-by: Mike Williams <miwilliams@google.com>
9 years ago
Yuxuan 'fishy' Wang
7960fa8735
[gitrepo] Support revision in remote tag.
...
Repo manifest file allows revision attribute in <remote> tag. This change
teaches JGit to read that information.
Change-Id: I1c878a2505b9d09fa09fbd404a119b71f2fb8fdb
Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
9 years ago
David Pursehouse
bebd30f364
FileTreeIteratorTest: Open Git and RevWalk in try-with-resource
...
Change-Id: I6e68c4b028e0aa01964eace10307372060371df7
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
92a8e0184c
RebaseCommandTest: Open RevWalk in try-with-resource
...
Change-Id: If7b7a90171d1349d634a84f135471ebac29e3210
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
7ccda5f63e
PullCommandTest: Open RevWalk in try-with-resource
...
Change-Id: I676cd7ef4bb29f980a313acd77506dd070e6c98f
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
e5cf4a89fd
BlameGeneratorTest: Create Git instances in try-with-resource
...
Change-Id: I2dc4191603fbd6c3214763b869882c51b0e53284
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
88d63ce174
Remove unnecessary suppression of deprecation warnings in tests
...
Change-Id: I722f8c2e80129e0129349b55a53b29626e2af21c
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
4c128b0764
DiffEntryTest: Open Git and TreeWalk in try-with-resource
...
Change-Id: If4a49268b9b7ec3a44ed1508ed78db365b0c9e5b
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
6b66240311
DiffCommandTest: Open Git and RevWalk in try-with-resource
...
Change-Id: I966f7e5053651661abc7de63c968e1f5bf2de464
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago