aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst/org/eclipse
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | Add method to read time unit from configHugo Arès2016-06-061-0/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Time units supported: -milliseconds (1 ms, 2 milliseconds) -seconds (1 s, 1 sec, 1 second, 2 seconds) -minutes (1 m, 1 min, 1 minute, 2 minutes) -hours (1 h, 1 hr, 1 hour, 2 hours) -days (1 d, 1 day, 2 days) -weeks (1 w, 1 week, 2 weeks) -months (1 mon, 1 month, 2 months) -years (1 y, 1 year, 2 years) This functionality is implemented in Gerrit ConfigUtil class. Add it to JGit so it can eventually be remove from Gerrit. Change-Id: I2d6564ff656b6ab9424a9360624061c94fd5f413 Signed-off-by: Hugo Arès <hugo.ares@ericsson.com>
* | | | | | http transport does not use authentication fallbackChristian Pontesegger2016-06-061-1/+1
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Git servers supporting HTTP transport can send multiple WWW-Authenticate challenges [1] for different authentication schemes the server supports. If authentication fails now retry all authentication types proposed by the server. [1] https://tools.ietf.org/html/rfc2617#page-3 Bug: 492057 Change-Id: I01d438a5896f9b1008bd6b751ad9c7cbf780af1a Signed-off-by: Christian Pontesegger <christian.pontesegger@web.de> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | Merge "Add missing @Test annotation in RepositoryCacheTest"Christian Halstrick2016-06-021-0/+1
|\ \ \ \ \
| * | | | | Add missing @Test annotation in RepositoryCacheTestHugo Arès2016-06-011-0/+1
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | Change-Id: I25a9b294084f7b9769efa67001a4973647da4079 Signed-off-by: Hugo Arès <hugo.ares@ericsson.com>
* | | | | Merge "Add missing @Test annotations"Christian Halstrick2016-06-021-0/+1
|\ \ \ \ \
| * | | | | Add missing @Test annotationsHugo Arès2016-06-011-0/+1
| |/ / / / | | | | | | | | | | | | | | | | | | | | Change-Id: Ie5ffcbf18233dc9b3eb232f714b5b58b6b93f4e0 Signed-off-by: Hugo Arès <hugo.ares@ericsson.com>
* / / / / DfsInserter: Optionally disable existing object checkDave Borowitz2016-06-011-0/+31
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using a DfsInserter for high-throughput insertion of many objects (analogous to git-fast-import), we don't necessarily want to do a random object lookup for each. It'll be faster from the inserter's perspective to insert the duplicate objects and let a later GC handle the deduplication. Change-Id: Ic97f5f01657b4525f157e6df66023f1f07fc1851
* | | | Fix javadoc errors and unused imports introduced by ddd0fe25Matthias Sohn2016-06-011-3/+0
| | | | | | | | | | | | | | | | Change-Id: I2d17115843e453c71febd4a58527effe658b48fd Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | RepoCommand: record manifest shallow recommendation in .gitmodulesStefan Beller2016-05-311-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Git core learned about the submodule.<name>.shallow option in .gitmodules files, which is a recommendation to clone a submodule shallow. A repo manifest may record a clone depth recommendation as an optional field, which contains more information than a binary shallow/nonshallow recommendation, so any attempted conversion may be lossy. In practice the clone depth recommendation is either '1' or doesn't exist, which is the binary behavior we have in Git core. Change-Id: I51aa9cb6d1d9660dae6ab6d21ad7bae9bc5325e6 Signed-off-by: Stefan Beller <sbeller@google.com>
* | | | RepoCommand: record manifest groups as submodule labelsStefan Beller2016-05-311-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Git core learned about attributes in pathspecs: pathspec: allow querying for attributes The pathspec mechanism is extended via the new ":(attr:eol=input)pattern/to/match" syntax to filter paths so that it requires paths to not just match the given pattern but also have the specified attrs attached for them to be chosen. (177161a5f7, 2016-05-20) We intend to use these pathspec attribute patterns for submodule grouping, similar to the grouping in repo. So the RepoCommand which translates repo manifest files into submodules should propagate this information along. This requires writing information to the .gitattributes file instead of the .gitmodules file. For now we just overwrite any existing .gitattributes file and do not care about prior attributes set. If this becomes an issue we need to figure out how to correctly amend the grouping information to an existing .gitattributes file. Change-Id: I0f55b45786b6b8fc3d5be62d7f6aab9ac00ed60e Signed-off-by: Stefan Beller <sbeller@google.com>
* | | | Replace use of deprecated method Repository.getRef()Matthias Sohn2016-05-311-1/+1
| | | | | | | | | | | | | | | | Change-Id: Iecf2b8deafc4991cc3333702fb9fa0638be7b914 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | RepoCommandTest: Improve assertion message for remote branch recordingStefan Beller2016-05-251-2/+2
| |_|/ |/| | | | | | | | | | | Change-Id: Ic14e9f9c4bf007b464e463f5047ec5a8d0b9236c Signed-off-by: Stefan Beller <sbeller@google.com>
* | | Support git config [include] section with absolute path(s)Marco Miller2016-05-211-0/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per [1], but limited to absolute paths indeed. No support yet for tilde or $HOME expansion. Support for the --[no-]includes options ([1]) is not part of this commit scope either, but those options' defaults are in effect as described in [1]. [1] https://git-scm.com/docs/git-config Included path can be a config file that includes other path-s in turn. An exception is thrown if too many recursions (circular includes) happen because of ill-specified config files. Change-Id: I700bd7b7e1625eb7de0180f220c707d8e7b0930b Signed-off-by: Marco Miller <marco.miller@ericsson.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Added filter for merge and non-merges commits.Alcemir Santos2016-05-201-0/+79
| | | | | | | | | | | | | | | | | | | | | | | | Added the option to retrieve either merge or non-merge commits in the LogCommand. Change-Id: Ie0e1c515a823f2392783f1a47d385c31230e8167 Signed-off-by: Alcemir Santos <alcemir.santos@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Fix StashApply regarding handling of untracked filesChristian Halstrick2016-05-191-1/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a bug regarding how JGit handled untracked files when applying a stash. Problem was that untracked files are applied by doing a merge of HEAD and untrackedFiles commit with a merge base of the stashed HEAD. That's wrong because the untrackedFiles commit has no parent and contains only the untracked files. Using stashed HEAD as merge base leads to unneccessary conflicts on files not event included in the untrackedFiles commit. Imagine this graph directly before you want to apply a stash which was based on 0. You want to apply the stash on current HEAD commit 5. 5 (HEAD,master) / 0---+ \ \ 1---3 (WIP on master) / 2 (untracked files on master) Imagine for a specific (tracked) file f - commit 0 contains X - HEAD contains Y - commit 2 (the untracked files) does not contain file f A merge of 2 and 5 with a merge base of 0 leads to a conflict. The 5 commit wants to modify the file and the 2 commit wants to delete the file -> conflict. If no merge base is set then the semantic is correct. Thanks to Bow for finding this bug and providing the test case. Bug: 485467 Change-Id: I453fa6ec337f81b2a52c4f51f23044faeec409e6 Also-by: Bow Ruggeri <bow@bow.net> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Make sure to overwrite files when "reset --hard" detects conflictsChristian Halstrick2016-05-181-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When performing a "reset --hard" a checkout is done. The pathes are checked for potential checkout conflicts. But in the end for all remaining conflicts these files are simply deleted from the working tree. That's not the right strategy to handle checkout conflicts during "reset --hard". Instead for every conflict we should simply checkout the merge commit's content. This is different from native gits behavior which reports errors when during a "checkout --hard" a file shows up where a folder was expected. "warning: unable to unlink d/c.txt: Not a directory" Why it is like that in native git was asked in http://permalink.gmane.org/gmane.comp.version-control.git/279482. Unless it is explained why native git why this error is reported JGit should overwrite the files. Bug: 474842 Change-Id: I08e23822a577aaf22120c5137eb169b6bd08447b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Allow setting FileMode to executable when applying patches in ApplyCommandNadav Cohen2016-05-171-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | git-apply allows modifying file modes in patched files using either "new mode" or "new file mode" headers. This patch adds support for setting files as executables and vice-versa. Change-Id: I24848966b46f686f540a8efa8150b42e0d9c3ad1 Signed-off-by: Nadav Cohen <nadavcoh@gmail.com>
* | | Fix config value get to return last instead of 1st just like gitMarco Miller2016-05-121-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this fix, getting the value of 'key' below used to return value1. This fix makes it so that value3 gets returned instead, just like native git's get. [section] key = value1 key = value2 key = value3 Change-Id: Iccb24de9b63c3ad8646c909494ca3f8c9ed6e29c Signed-off-by: Marco Miller <marco.miller@ericsson.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Merge branch 'stable-4.3'Matthias Sohn2016-05-052-17/+30
|\ \ \ | |/ / |/| / | |/ | | | | | | | | | | | | | | * stable-4.3: Scan loose ref before packed in case gc about to remove the loose Fix possible NPEs when reporting transport errors Fix calling of clean/smudge filters from Checkout,MergeCommands Fix ApplyCommand when result of patch is an empty file Change-Id: I0dc76b7a8c87ce8e0386a1b9e0fa92a3aa62abf7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Fix calling of clean/smudge filters from Checkout,MergeCommandsChristian Halstrick2016-04-221-17/+20
| | | | | | | | | | | | | | | | | | When CheckoutCommand or MergeCommand is called then not in all situation the treewalks have been prepared to support clean/smudge filters. Fix this Bug: 491505 Change-Id: Iab5608049221c46d06812552ab97299e44d59e64
| * Fix ApplyCommand when result of patch is an empty fileJon Schneider2016-04-161-0/+10
| | | | | | | | | | | | | | | | | | | | Such hunks are identifiable by a zero value for "new start line". Prior to the fix, JGit throws and ArrayIndexOutOfBoundsException on such patches. Change-Id: I4f3deb5e5f41a08af965fcc178d678c77270cddb Signed-off-by: Jonathan Schneider <jkschneider@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | PersonIdent: Make appendSanitized publicDave Borowitz2016-05-031-0/+7
| | | | | | | | Change-Id: I337c90fff3c013819a42a7622ac6bacc72828c07
* | PersonIdent: Strip some special chars from external stringsDave Borowitz2016-04-291-4/+37
| | | | | | | | | | | | | | | | | | | | | | The special characters <> and '\n' interfere with parsing of identities. C git strips these special characters, so we should too. Rather than allocating extra strings by calling String#trim(), add a few lines to our sanitization method to perform the same trimming as described in String's Javadoc. Change-Id: I96edcb93a2fc194ee354d60566d352299742a52f
* | PersonIdent: Document that name and email aren't trimmedDave Borowitz2016-04-291-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | This might be somewhat surprising behavior to users who might naturally assume the following invariant: ident.equals(parseIdent(ident.toExternalString())) This invariant does not hold since whitespace is only trimmed during serialization. We don't want to mess with the strings during initialization, as this is called during the highly-optimized commit parsing codepath. Change-Id: I081a603f0ac0e33167462244779b0ff3ad51e80c
* | Expose the ObjectInserter that created an ObjectReaderDave Borowitz2016-04-261-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We've found in Gerrit Code Review that it is common to pass around both an ObjectReader (or more commonly a RevWalk wrapping one) and an ObjectInserter. These code paths often assume that the ObjectReader can read back any objects created by the ObjectInserter without flushing. However, we previously had no way to enforce that constraint programmatically, leading to hard-to-spot problems. Provide a solution by exposing the ObjectInserter that created an ObjectReader, when known. Callers can either continue passing both objects and check: reader.getCreatedFromInserter() == inserter or they can just pass around ObjectReader and extract the inserter when it's needed (checking that it's not null at usage time). Change-Id: Ibbf5d1968b506f6b47030ab1b046ffccb47352ea
* | Expose conflicting files in CheckoutConflictExceptionNed Twigg2016-04-111-0/+2
| | | | | | | | | | Change-Id: I5b3b7b0633354d5ccf0c6c320c0df9c93fdf8eeb Signed-off-by: Ned Twigg <ned.twigg@diffplug.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Merge "Fix CommitCommand to be able to skip writing to RefLog"Matthias Sohn2016-04-111-0/+31
|\ \ | |/ |/|
| * Fix CommitCommand to be able to skip writing to RefLogChristian Halstrick2016-04-111-0/+31
| | | | | | | | | | | | | | | | | | | | CommitCommand already provided a method to set the comment which should be written into the reflog. The underlying RefUpdate class supported to skip writing a reflog entry. But through the CommitCommand API it was not possible to prevent writing a reflog entry. Fix this and allow creating commits which don't occur in the reflog. Change-Id: I193c53de71fb5958ea749c4bfa8360a51acc9b58
* | Merge branch 'master' into stable-4.3Matthias Sohn2016-04-071-0/+35
|\| | | | | | | | | | | | | | | | | | | * master: Remove repository from cache when it's closed Fix RefDirectory not closing resources Fix repository cache never closing repository Change-Id: I9dc9d017806cba25125f69b53812cc3e062ef975 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Remove repository from cache when it's closedHugo Arès2016-04-071-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RepositoryCache has 2 methods to remove a repository from the cache but they are never called when a repository is closed. Users of the cache were expected to call one of those 2 methods but how could they have called them at proper time without having visibility of the repository usage count. Ideally, I would have reworked the RepositoryCache to wrap any repository it opens in a class that would be responsible to unregister them from the cache when it's really closed, i.e. when usage counter reaches 0. The problem preventing the wrapping solution is the RepositoryCache.register method that allows to register an already opened repository in the cache. Such repositories cannot be wrapped because callers are still holding a reference on the unwrapped repository. Document that RepositoryCache.close method is removing the repository from the cache as well as closing it and rework RepositoryCache.unregister method to only remove the repository from the cache. Use the latter to unregister repository when Repository.doClose is getting executed. Change-Id: Ia364816e4da8d7b6cfa72f10758ca31aa8a1f9db Signed-off-by: Hugo Arès <hugo.ares@ericsson.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Fix repository cache never closing repositoryHugo Arès2016-04-071-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Repository has a usage counter that is initialized to 1 at instantiation and this counter is decremented when Repository.close method is called. There is also a Repository.incrementOpen method that RepositoryCache uses to increment the usage count when it's returning a repository that is already opened. The problem was that RepositoryCache was incrementing the usage count for repositories that it just opened or registered. The usage count was 2 when it should have been 1. Incrementing usage count is now only be done for repository that are served from the cache. This bug is causing slow memory increase of our Gerrit server until the server become slow. Even if the RepositoryCache is using SoftReference, it seems that the JVM is not garbage collecting the repositories because it's not yet on the edge of being out of memory. To test this change, I replicated all repositories(11k) from Gerrit master to one slave. The Gerrit master used memory after this test was 10GB without this change and 3.5GB with. Change-Id: I86c7b36174e384f106b51fe92f306018fd1dbdf0 Signed-off-by: Hugo Arès <hugo.ares@ericsson.com>
* | Merge branch 'master' into stable-4.3Matthias Sohn2016-04-062-4/+18
|\| | | | | | | | | | | | | | | | | * master: Add config parameter gc.prunePackExpire for packfile expiration In TestRepository, use a consistent clock Change-Id: I7ac568e650fbd191e48a8f1a4068af72deb242e8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Add config parameter gc.prunePackExpire for packfile expirationChristian Halstrick2016-03-312-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | JGit's Garbage Collector is repacking relevant objects into new packfiles and is afterwards deleting the now obsolete packfiles. But to prevent problems caused by race conditions JGit was not deleting packfiles when they are too young. The same mechanism as for loose objects and the config parameter gc.pruneExpire was used. But JGit was reusing the parameter gc.pruneExpire also for packfiles which may cause a lot of filesystem consumption if gc.pruneExpire was set to the default of 2 weeks. Only two weeks after packfile creation gc was allowed to delete this packfile. This change introduces a new config paramter gc.prunePackExpire with a default of "1.hour". This parameter is used when packfiles are deleted. Only packfiles older than the specified time can be deleted. For loose objects the behaviour is not changed and only the old parameter gc.pruneExpire is relevant. Change-Id: I6209efb05678b15153bd22479dc13486907a44f8
* | Enable calling of smudge filters when checking out pathsChristian Halstrick2016-04-061-0/+107
| | | | | | | | | | | | | | | | | | | | | | | | When checking out commits/branches JGit was triggering correctly configured smudge filters. But when checking out paths (either from index or from commits) JGit was not triggering smudge filters. Fix CheckoutCommand to properly call filters. Bug: 486560 Also-by: Pascal Krause <pascal.krausek@sap.com> Change-Id: I5ff893054defe57ab12e201d901fe74e1376efea Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Implement DIR_NO_GITLINKSPreben Ingvaldsen2016-04-052-9/+149
|/ | | | | | | | | Implement the DIR_NO_GITLINKS setting with the same functionality it provides in cGit. Bug: 436200 Change-Id: I8304e42df2d7e8d7925f515805e075a92ff6ce28 Signed-off-by: Preben Ingvaldsen <preben@puppetlabs.com>
* Introduce FileModeStrategy to FileTreeIteratorPreben Ingvaldsen2016-03-111-5/+85
| | | | | | | | | | | | This commit introduces a FileModeStrategy to the FileTreeIterator class. This provides a way to allow different modes of traversing a file tree; for example, to control whether or not a nested .git directory should be treated as a gitlink. Bug: 436200 Change-Id: Ibf85defee28cdeec1e1463e596d0dcd03090dddd Signed-off-by: Preben Ingvaldsen <preben@puppetlabs.com>
* Add EOL stream type detection to TreeWalkIvan Motsch2016-03-074-4/+1033
| | | | | | | | | | | | | | TreeWalk provides the new method getEolStreamType. This new method can be used with EolStreamTypeUtil in order to create a wrapped InputStream or OutputStream when reading / writing files. The implementation implements support for the git configuration options core.crlf, core.eol and the .gitattributes "text", "eol" and "binary" CQ: 10896 Bug: 486563 Change-Id: Ie4f6367afc2a6aec1de56faf95120fff0339a358 Signed-off-by: Ivan Motsch <ivan.motsch@bsiag.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix apply patch which did not work with non-ascii charactersXinTong Wang2016-03-031-0/+49
| | | | | | Bug: 483943 Change-Id: If28f64053d20ab1bee54245f223e952dc2fe392c Signed-off-by: XinTong Wang <xintong@ca.ibm.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Merge branch 'stable-4.2'Matthias Sohn2016-02-161-1/+1
|\ | | | | | | | | | | | | | | * stable-4.2: Revert "Fix warnings about unchecked conversion of MergeResult" Change-Id: I31c2e0679ad4cff77190858ac9a570d04841c386 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Merge "Revert "Fix warnings about unchecked conversion of MergeResult"" into ↵Shawn Pearce2016-02-151-1/+1
| |\ | | | | | | | | | stable-4.2
| | * Revert "Fix warnings about unchecked conversion of MergeResult"Shawn Pearce2016-02-151-1/+1
| | | | | | | | | | | | | | | | | | | | | This reverts commit 979fa19110df0906a82e92e32d7d3ccf7eca3712. Breaks API. Change-Id: I54af657898d49f64d6906fe3edfb6b08e996d901
* | | Merge branch 'stable-4.2'Matthias Sohn2016-02-1517-1843/+1893
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.2: Don't use deprecated LockFile constructor Fix warnings about unchecked conversion of MergeResult MockServletConfig: Fix warning about unchecked conversion of Enumeration HugeFileTest: Make Git a class member and open in try-with-resource Suppress "unchecked cast" warnings related to UploadPackFactory.DISABLED DiffAlgorithms: Fix warnings about variable hiding DirCacheBasicTest: Open ObjectInserter.Formatter in try-with-resource DirCacheBuilderIteratorTest: Open TreeWalk in try-with-resource DirCacheCGitCompatabilityTest: Open TreeWalk in try-with-resource DirCacheCheckoutMaliciousPathTest: Open Git and RevWalk in t-w-r DirCacheIteratorTest: Open TreeWalk instances in try-with-resource ForPathTest: Open TreeWalk in try-with-resource GitConstructionTest: Open Git instance in try-with-resource IndexDiffTest: Open Git instances in try-with-resources ManifestParserTest: Don't use deprecated StringBufferInputStream InMemoryRepository: Remove unused RevWalk from batch method signature IndexModificationTimesTest: Open Git instances in try-with-resource InterIndexDiffFilterTest: Open TreeWalk in try-with-resource LockFileTest: Open Git instance in try-with-resource JGit v4.1.2.201602141800-r MergeCommandTest: Use JUnit's assume to check preconditions MergeCommandTest: Open Git instances in try-with-resource Change-Id: Ie5dba6b9132a29e86958a04fa2b76465bcd2c6b5 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | Merge changes I13672371,I95074358 into stable-4.2Shawn Pearce2016-02-151-1207/+1216
| |\ \ | | | | | | | | | | | | | | | | | | | | * changes: MergeCommandTest: Use JUnit's assume to check preconditions MergeCommandTest: Open Git instances in try-with-resource
| | * | MergeCommandTest: Use JUnit's assume to check preconditionsDavid Pursehouse2016-02-121-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * | MergeCommandTest: Open Git instances in try-with-resourceDavid Pursehouse2016-02-121-1202/+1212
| | | | | | | | | | | | | | | | | | | | Change-Id: I95074358cec6fef6b5ced7bb7b117c33fee08a7a Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * | | Don't use deprecated LockFile constructorDavid Pursehouse2016-02-153-7/+5
| | |/ | |/| | | | | | | | | | Change-Id: Ibc3e2f3372e1a65732dd6d3c71cec53fb1aa15e2 Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * | Fix warnings about unchecked conversion of MergeResultDavid Pursehouse2016-02-151-1/+1
| | | | | | | | | | | | | | | Change-Id: I1490b2209fa7b39676849c624adbc262a672f6df Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * | HugeFileTest: Make Git a class member and open in try-with-resourceDavid Pursehouse2016-02-151-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | DirCacheBasicTest: Open ObjectInserter.Formatter in try-with-resourceDavid Pursehouse2016-02-151-3/+5
| | | | | | | | | | | | | | | Change-Id: Ie4b3e5ad9616bc56b6d8d2476d1e6c6319c1a0aa Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * | DirCacheBuilderIteratorTest: Open TreeWalk in try-with-resourceDavid Pursehouse2016-02-151-15/+16
| | | | | | | | | | | | | | | Change-Id: I94836315918924cba9a2b5be6b9ae417cb2ad215 Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>