summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.junit
Commit message (Collapse)AuthorAgeFilesLines
* TestRepository: Expose a Git instanceDave Borowitz2015-03-181-0/+12
| | | | Change-Id: I2fab7dd9a24205686db4724e77c0fd0a28f2075e
* TestRepository: Allow setting explicit Change-IdDave Borowitz2015-03-121-9/+22
| | | | | | | This includes both leaving existing Change-Ids alone (as, for example Gerrit's commit-msg hook does) and programmatically setting a value. Change-Id: Iaaffb0107ae27de24df1f0e95a8d628fb8ea5364
* TestRepository: Ignore existing Change-Id in messageDave Borowitz2015-03-121-0/+4
| | | | Change-Id: I343c3065fa369ef8aab2b033ac1e392b28d10daf
* TestRepository: Support committing to unborn symrefDave Borowitz2015-03-121-2/+1
| | | | Change-Id: I6bcee635adda7c929f6fa68ef20438fe77e49184
* TestRepository: Expose some getters for CommitBuilderDave Borowitz2015-03-121-0/+16
| | | | Change-Id: Ic6d179bd2de0081633c22fb82ca68ea619cb686f
* TestRepository: Add methods to amend commits or refsDave Borowitz2015-03-121-12/+87
| | | | Change-Id: I47082416f6e281262b160ba15272258f9109abd1
* TestRepository: Add a reset method to move HEAD aroundDave Borowitz2015-03-121-0/+55
| | | | | | | | | This flushed out a number of bugs in the way DfsRefUpdate, or at least the InMemoryRepository implementation, processes symrefs. These have been fixed, to an extent, in InMemoryRepository, but other implementations may still suffer from these bugs. Change-Id: Ifd12115a0060b9ff45a88d305b72f91ca0472f9a
* TestRepository: Optionally insert Change-Id in commit messageDave Borowitz2015-03-121-1/+25
| | | | | | Copied the implementation from CommitCommand. Change-Id: Iade0e2d70bde70cfa830fe23bcc41959b011a14a
* TestRepository: Allow custom author/committer per-commitDave Borowitz2015-03-111-9/+32
| | | | Change-Id: I078fe00470ebe60f93f4a718c163dd1412fdc776
* TestRepository: Use try-with-resources where appropriateDave Borowitz2015-03-111-74/+58
| | | | Change-Id: I06f9534ab84278df37a140700fc2bed5ab667299
* Set minimum required Java version to Java 7Matthias Sohn2015-02-093-5/+5
| | | | | | Bug: 458475 Change-Id: Iea8f2236d4e6a94a8d14bb8cc685006ea3fd1bb7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 4.0.0-SNAPSHOT buildsMatthias Sohn2015-01-272-16/+16
| | | | | Change-Id: I414ba8ccc82866d3107ba7083a567ea70c879bdf Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 3.7.0-SNAPSHOT buildsMatthias Sohn2014-12-242-16/+16
| | | | | Change-Id: Ib3e7b5f46ee1e27b9cf25b3b2d01d681a5c4904c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 3.6.1-SNAPSHOT buildsMatthias Sohn2014-12-232-16/+16
| | | | | Change-Id: Ie620c90ffafbffc6755b4e1ed55a61a15b118a2a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v3.6.0.201412230720-rv3.6.0.201412230720-rMatthias Sohn2014-12-232-2/+2
| | | | | Change-Id: Ic28e2bbbdb1099e948c64a005c39f6b8d8ac69a8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix junit tests under windows when the platform is explicitly changedChristian Halstrick2014-12-221-0/+2
| | | | | | | | | | | | 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
* Allow explicit configuration of git directory in InitCommandChristian Halstrick2014-12-151-0/+1
| | | | | | | | | | | | | | 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
* Fix LocalDiskRepositoryTestCase to create correct type of reposChristian Halstrick2014-12-121-1/+1
| | | | | | | | | 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>
* Prepare post 3.6.0-m1 buildsMatthias Sohn2014-11-122-2/+2
| | | | | Change-Id: Ie9927de64fa6b7d517f96b8cd12e57541f284ff2 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v3.6.0.201411121045-m1v3.6.0.201411121045-m1Matthias Sohn2014-11-122-2/+2
| | | | | Change-Id: I9d789113d88cbbbdbabb8919f80c805aa4ba86fe Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 3.6.0-SNAPSHOT buildsMatthias Sohn2014-09-052-16/+16
| | | | | Change-Id: I2d8c3768998c0cfc8d02d11009bc5b7ed1d75778 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix RecursiveMerger's internal use of merge to find a merge baseChristian Halstrick2014-07-252-0/+9
| | | | | | | | | | | | | | | | | | When RecursiveMerger tried to determine a common base tree it was recursively tried to merge multiple common bases. But these intermediate merges which have just been done to determine a single common base for the final merge already filled some important fields (toBeCheckedOut, toBeDeleted, ...). These side effects of the intermediate merges led to wrong results of the final merge. One symptom was that after a recursive merge which should be succesful you could still see leftover files in the worktree: files which existed in the (virtual) common base but which don't exist anymore in the branches to be merged. The solution is easy: Clear the appropriate fields after common base determination and start the final merge with a clean state. Change-Id: I644ea9e1cb15360f7901bc0483cdb9286308c226 Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
* Don't warn for methods that can be staticRobin Rosenberg2014-07-021-1/+1
| | | | | | | | Making the methods static would gain little in performance, make the code harder to change. Removing unncessary warnings is more important. Change-Id: If3e6aa9c1d92e58b4e7a8e246cf4aace237d7a7b
* Add new default settings from Eclipse 4.4Robin Rosenberg2014-07-021-0/+5
| | | | | | | | These settings were added by Eclipse simply by touching the project settings. Adding these makes it simpler to see what local changes have been made. Change-Id: Iab0aa62530312eb0c78b03b5c6a632742bcc4978
* Try to fix intermittent test failure related to file timestampsRobin Rosenberg2014-07-011-3/+4
| | | | | | | | | | Improve how tests do a "touch" operation on files. Instead of doing "f.setLastModified(System.currentTimeMillis)" open a Outputstream on the file and directly close it again. This makes this method rely only on one clock - the clock of the filesystem. Bug: 436917 Change-Id: I68ef3c2878f28b12daebf2ef6a9fa0a5d6e0964d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 3.5.0-SNAPSHOT buildsRobin Rosenberg2014-06-042-16/+16
| | | | | Change-Id: I53bd500188e09ae2e007a58b3cd89aa0805d6f2a Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
* Prepare post 3.4.0 RC1 buildsMatthias Sohn2014-05-212-2/+2
| | | | Change-Id: Ia8d29046439bc9134acdf7c88ab85ea49c4ddf47 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v3.4.0.201405211411-rc1v3.4.0.201405211411-rc1Matthias Sohn2014-05-212-2/+2
| | | | | Change-Id: Ia3834770b9719f64cbdfd0338034c392fa3ae5db Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 3.4.0-SNAPSHOT buildsMatthias Sohn2014-05-062-2/+2
| | | | Change-Id: I5cf20c875c3e92e12c2b22465774ba42513b9add Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v3.4.0.201405051725-m7v3.4.0.201405051725-m7Matthias Sohn2014-05-052-2/+2
| | | | | Change-Id: I8d941d22becdf019199a1c0fe28aa5835038647d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 3.4.0-SNAPSHOT buildsMatthias Sohn2014-03-052-16/+16
| | | | | Change-Id: I907c6f1834c06b8ab4d3e0f76dde475faea7b4a5 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 3.3.1-SNAPSHOT buildsMatthias Sohn2014-03-052-16/+16
| | | | Change-Id: If15560f2731e54dbf9db88d8a308b4c25ce27e8e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v3.3.0.201403021825-rv3.3.0.201403021825-rMatthias Sohn2014-03-032-2/+2
| | | | | Change-Id: Iaf3da455f7d6f691617299e881154ff8185a9d46 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare post 3.3.0RC1 buildsMatthias Sohn2014-02-202-2/+2
| | | | | Change-Id: I0d808f8733a490b75bbcaacedb4b095e05fab32e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v3.3.0.201402191814-rc1v3.3.0.201402191814-rc1Matthias Sohn2014-02-202-2/+2
| | | | | Change-Id: Ida3a0417ae646ce37214153f49a85de2be3dd4fd Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 3.3.0-SNAPSHOT buildsMatthias Sohn2013-12-052-16/+16
| | | | | Change-Id: I7c7e7c1beec0c5d15b96c14c73ce93e3f09855c8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Move SampleDataRepositoryTestCase to org.eclipse.jgit.testShawn Pearce2013-11-241-76/+0
| | | | | | | | This class requires resources which are private to another bundle. Move the class next to its resources, removing an odd cross bundle dependency. Change-Id: I30d5568b09ea5fb3bd3bb60b602f149c0867f49a
* Support running from JARs in JGitTestUtilShawn Pearce2013-11-242-5/+38
| | | | | | | | Buck invokes JUnit tests from compiled JARs, not class directories. When copying a resource back to the filesystem a jar: style URL is obtained from the ClassLoader. Change-Id: I28d702484ec13b0b309b87990da867050e4b5ec6
* Enhance RepositoryTestCase.commitFile() to work on empty repositoryMatthias Sohn2013-10-311-4/+13
| | | | | Change-Id: Ic64497f0eedf8996ba593ca52dc9a040732a5b24 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Make sure SystemReader is reset after test is runRobin Stocker2013-10-221-0/+2
| | | | | | | | Otherwise the MockSystemReader from the test setup is active for other tests. Change-Id: I7caf693bd692d06936e29efd4dc4aabb48c1c39b Signed-off-by: Robin Stocker <robin@nibor.org>
* Fix failed tests when the tmp directory is a symlinkRobin Rosenberg2013-10-201-0/+5
| | | | | | On Mac OS X /tmp is by default a symbolic link. Change-Id: I0913ee5ee8db5c5918a9e41abbbfe125b6c70783 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 3.2.0-SNAPSHOT buildsMatthias Sohn2013-10-032-16/+16
| | | | | Change-Id: Iac6cf7a5bb6146ee3fe38abe8020fc3fc4217584 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare post 3.1.0 buildsstable-3.1Matthias Sohn2013-10-032-16/+16
| | | | | Change-Id: I306a3d40c6ddb88a16d17f09a60e3d19b0716962 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v3.1.0.201310021548-rv3.1.0.201310021548-rMatthias Sohn2013-10-022-2/+2
| | | | | Change-Id: I2170b13047d5eab7565f47f9feb1680e03b1ba09 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare post 3.1.0 RC1 buildsMatthias Sohn2013-09-272-2/+2
| | | | | Change-Id: I060f2082ccd0c91905b6b29a49cc633a0b51a1f2 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v3.1.0.201309270735-rc1v3.1.0.201309270735-rc1Matthias Sohn2013-09-272-2/+2
| | | | | Change-Id: I48202dd461110da25f9bc159c938311fff0669e0 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Update reflog like C Git during rebase (non-interactive)Robin Rosenberg2013-07-211-0/+1
| | | | | | Bug: 346350 Change-Id: I119766a00bc52a810c51cffaa19207cb8555ca22 Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
* Disable warning about assigning to parameterRobin Stocker2013-06-151-1/+1
| | | | | | | | | See change I08bed4275af9ec52aa4d7054067ac82f6a3c9781, where fixing such warning lead to complaints. If fixing is not wanted, disable it instead. Change-Id: If31d4028fa1c6377a11e83ed5688b45701cec68b
* Prepare 3.1.0-SNAPSHOT buildsMatthias Sohn2013-06-132-16/+16
| | | | | Change-Id: I7490a7c9558423c03e3c167ad55b9a98be9d99d9 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Remove unused import in LocalDiskRepositoryTestCaseTomasz Zarna2013-05-131-1/+0
| | | | Change-Id: Ib8a8e72dd3c808c4fe92c32ed177272dce29ac60