summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Prepare 5.4.3-SNAPSHOT buildsMatthias Sohn2019-08-2375-453/+453
| | | | | Change-Id: Iaf5140446dcf86a50bdb1a30860dfd624d3ec337 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v5.4.2.201908231537-rv5.4.2.201908231537-rMatthias Sohn2019-08-2373-104/+104
| | | | | Change-Id: I1d808c63db81435173987c399c90bda7bc5c8d9d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Merge branch 'stable-5.3' into stable-5.4Matthias Sohn2019-08-235-28/+32
|\ | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.3: Prepare 5.3.5-SNAPSHOT builds JGit v5.3.4.201908231101-r Prepare 5.1.11-SNAPSHOT builds JGit v5.1.10.201908230655-r Use AtomicReferences to cache user and system level configs Fix copy-paste typo in CloneCommand#cleanup SystemReader: Use correct constructor of FileBasedConfig Change-Id: I4422632766fc5554a20f75346c5480b7fb611484 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Prepare 5.3.5-SNAPSHOT buildsMatthias Sohn2019-08-2371-427/+445
| | | | | | | | | | Change-Id: Ic0b9dfcac814ac7584e5eb19105f46344a10465a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * JGit v5.3.4.201908231101-rv5.3.4.201908231101-rMatthias Sohn2019-08-2368-89/+89
| | | | | | | | | | Change-Id: Ia98f47d9a10d6b8cccca6b697230dad4f350d720 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Merge branch 'stable-5.2' into stable-5.3Matthias Sohn2019-08-235-28/+27
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.2: Prepare 5.1.11-SNAPSHOT builds JGit v5.1.10.201908230655-r Use AtomicReferences to cache user and system level configs Fix copy-paste typo in CloneCommand#cleanup Change-Id: I3ababc0f9b540cf1785925395d32a85d30aed40d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * Merge branch 'stable-5.1' into stable-5.2Matthias Sohn2019-08-232-25/+24
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.1: Prepare 5.1.11-SNAPSHOT builds JGit v5.1.10.201908230655-r Use AtomicReferences to cache user and system level configs Fix copy-paste typo in CloneCommand#cleanup Change-Id: Ie383633de334e65901ed4c6deb2d59cfcce98e16
| | | * Prepare 5.1.11-SNAPSHOT buildsMatthias Sohn2019-08-2359-362/+362
| | | | | | | | | | | | | | | | | | | | Change-Id: I8608580424d0e523dcace63f83ae530ba78dbb15 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * JGit v5.1.10.201908230655-rv5.1.10.201908230655-rMatthias Sohn2019-08-2356-59/+59
| | | | | | | | | | | | | | | | | | | | Change-Id: I68d15ebd6054bdeaf62e14cddb87724828db7943 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * Use AtomicReferences to cache user and system level configsMatthias Sohn2019-08-231-24/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ensures that only one instance of user and one instance of system config is set. Change-Id: Idd00150f91d2d40af79499dd7bf8ad5940f87c4e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * Fix copy-paste typo in CloneCommand#cleanupAdrien Bustany2019-08-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | deleteChildren was called on directory instead of gitDir, leading to a potential null pointer exception if the git directory existed initially. Bug: 550340 Change-Id: Iafc3b2961253a99862a59e81c7371f7bc564b412 Signed-off-by: Adrien Bustany <adrien-xx-eclipse@bustany.org>
| * | | SystemReader: Use correct constructor of FileBasedConfigDavid Pursehouse2019-08-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The merge done in change If0c5010a2 resolved a conflict incorrectly and reverted the fix that was done in change Id0bcdc93b. Change-Id: I0f5fde33d1f366817f2b966eb42535f7bd3b063e Reported-by: Thomas Wolf <thomas.wolf@paranor.ch> Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | Prepare 5.4.2-SNAPSHOT buildsMatthias Sohn2019-08-2172-450/+450
| | | | | | | | | | | | | | | | | | | | Change-Id: I5b2fde2d69ef1cc11b085874ab783ba48e070470 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | JGit v5.4.1.201908211225-rv5.4.1.201908211225-rMatthias Sohn2019-08-2172-103/+103
| | | | | | | | | | | | | | | | | | | | Change-Id: Ifa99b930bd20a9bc10696c414c73ebde0cd4b0c8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | Merge branch 'stable-5.3' into stable-5.4Matthias Sohn2019-08-213-8/+9
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.3: Prepare 5.3.4-SNAPSHOT builds JGit v5.3.3.201908210735-r Add missing @since tag on FileTreeIterator#getLastModifiedInstant Prepare 5.1.10-SNAPSHOT builds JGit v5.1.9.201908210455-r Avoid sign extension when comparing mtime with Instant#getEpochSecond Fix deprecation in DirCache caused by Instant based DirCacheEntry Change-Id: Ic3c8d3adf522b73f87c713538a14697eb690f508 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | Prepare 5.3.4-SNAPSHOT buildsMatthias Sohn2019-08-2168-427/+427
| | | | | | | | | | | | | | | | | | | | Change-Id: I1ccfeb28e87d13b25a8892947e62f1151130b6a6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | JGit v5.3.3.201908210735-rv5.3.3.201908210735-rMatthias Sohn2019-08-2168-89/+89
| | | | | | | | | | | | | | | | | | | | Change-Id: I799859e47616af0ac5ee3a982cb9350d141681d7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | Merge branch 'stable-5.2' into stable-5.3Matthias Sohn2019-08-213-8/+9
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.2: Add missing @since tag on FileTreeIterator#getLastModifiedInstant Prepare 5.1.10-SNAPSHOT builds JGit v5.1.9.201908210455-r Avoid sign extension when comparing mtime with Instant#getEpochSecond Fix deprecation in DirCache caused by Instant based DirCacheEntry Change-Id: If6d5f4dfd9fc8e8c09e29aa11b1004057eafeb9f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * | Merge branch 'stable-5.1' into stable-5.2Matthias Sohn2019-08-213-8/+9
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.1: Add missing @since tag on FileTreeIterator#getLastModifiedInstant Prepare 5.1.10-SNAPSHOT builds JGit v5.1.9.201908210455-r Avoid sign extension when comparing mtime with Instant#getEpochSecond Fix deprecation in DirCache caused by Instant based DirCacheEntry Change-Id: Id824c0b8b14dad5947ae9da1f90c3471e07b400f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * Add missing @since tag on FileTreeIterator#getLastModifiedInstantMatthias Sohn2019-08-211-0/+3
| | | | | | | | | | | | | | | | Change-Id: I809399e6a71e0079d2f0007b0d3f00b531d451bb Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * Prepare 5.1.10-SNAPSHOT buildsMatthias Sohn2019-08-2159-362/+362
| | | | | | | | | | | | | | | | | | | | Change-Id: If10afc8e663299a15db8c5fd0574fb51bf7e7ae9 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * JGit v5.1.9.201908210455-rv5.1.9.201908210455-rMatthias Sohn2019-08-2156-59/+59
| | | | | | | | | | | | | | | | | | | | Change-Id: Iaade207292acb8b27e01aca7e1af97ad7db1e854 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * Avoid sign extension when comparing mtime with Instant#getEpochSecondMatthias Sohn2019-08-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure we use the same type when comparing seconds since the epoch. This does not prevent that in 2038 timestamps in seconds since the epoch stored in a 32 bit integer will overflow. Integer.MAX_VALUE translates to 2038-01-19T03:14:07Z. After this date we'll have an issue since we store seconds since the epoch in a 32 bit integer in some places. Bug: 319142 Change-Id: If0c03003d40b480f044686e2f7a2f62c9f4e2fe1 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * Fix deprecation in DirCache caused by Instant based DirCacheEntryMichael Keppler2019-08-211-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the two int variables smudge_s and smudge_ns by an Instant and use the new method DirCacheEntry.mightBeRacilyClean(Instant). Change-Id: Id70adbb0856a64909617acf65da1bae8e2ae934a Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | Merge branch 'stable-5.3' into stable-5.4Matthias Sohn2019-08-2042-341/+635
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.3: Fix NPE in RebaseTodoFile#parseComments Fix NPE in ObjectIdOwnerMap#get Fix NPE in CommitOnlyTest#getHead FileUtils#lastModifiedInstant should not log error if path doesn't exist Cache user global and system-wide git configurations Avoid setup and saving FileStoreAttributes compete for ~/.gitconfig lock Add missing dependencies for running FS_POSIXTest in Eclipse Fix javadoc for SystemReader#getInstance Improve retry handling when saving FileStoreAttributes fails Ensure FSTest uses MockSystemReader Make supportsAtomicCreateNewFile return true as default Update orbit to R20190602212107-2019-06 to enable backports from master Handle InvalidPathException in FS_POSIX#createNewFileAtomic Ensure root cause of lock creation failures is logged Implement toString in MockSystemReader and MockConfig LocalDiskRefTreeDatabaseTest shall use MockSystemReader Ensure LocalDiskRepositoryTestCase#setup fully uses MockSystemReader Ensure we use MockSystemReader in tests Override FileBasedConfig's save method in MockConfig Remove FileBasedConfig.load(boolean) introduced in d45219ba Disable debug log for FS in org.eclipse.jgit.test Bazel: enable logging for tests in org.eclipse.jgit.test LockFile: log exception if creation of lock file failed Stop using deprecated Constants.CHARACTER_ENCODING Change-Id: I43c2ab8b44c3e87d48e4072907ad169c81e3ffe0 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | Merge branch 'stable-5.2' into stable-5.3Matthias Sohn2019-08-1949-383/+754
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.2: Fix NPE in RebaseTodoFile#parseComments Fix NPE in ObjectIdOwnerMap#get Fix NPE in CommitOnlyTest#getHead FileUtils#lastModifiedInstant should not log error if path doesn't exist Cache user global and system-wide git configurations Avoid setup and saving FileStoreAttributes compete for ~/.gitconfig lock Add missing dependencies for running FS_POSIXTest in Eclipse Fix javadoc for SystemReader#getInstance Improve retry handling when saving FileStoreAttributes fails Ensure FSTest uses MockSystemReader Make supportsAtomicCreateNewFile return true as default Update orbit to R20190602212107-2019-06 to enable backports from master Handle InvalidPathException in FS_POSIX#createNewFileAtomic Ensure root cause of lock creation failures is logged Implement toString in MockSystemReader and MockConfig LocalDiskRefTreeDatabaseTest shall use MockSystemReader Ensure LocalDiskRepositoryTestCase#setup fully uses MockSystemReader Ensure we use MockSystemReader in tests Override FileBasedConfig's save method in MockConfig Remove FileBasedConfig.load(boolean) introduced in d45219ba Disable debug log for FS in org.eclipse.jgit.test Bazel: enable logging for tests in org.eclipse.jgit.test LockFile: log exception if creation of lock file failed Stop using deprecated Constants.CHARACTER_ENCODING Change-Id: If0c5010a2cf151ebebb2f2088fac3ee02c5007b9 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * | Merge branch 'stable-5.1' into stable-5.2Matthias Sohn2019-08-1949-398/+760
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.1: Fix NPE in RebaseTodoFile#parseComments Fix NPE in ObjectIdOwnerMap#get Fix NPE in CommitOnlyTest#getHead FileUtils#lastModifiedInstant should not log error if path doesn't exist Cache user global and system-wide git configurations Avoid setup and saving FileStoreAttributes compete for ~/.gitconfig lock Add missing dependencies for running FS_POSIXTest in Eclipse Fix javadoc for SystemReader#getInstance Improve retry handling when saving FileStoreAttributes fails Ensure FSTest uses MockSystemReader Make supportsAtomicCreateNewFile return true as default Update orbit to R20190602212107-2019-06 to enable backports from master Handle InvalidPathException in FS_POSIX#createNewFileAtomic Ensure root cause of lock creation failures is logged Implement toString in MockSystemReader and MockConfig LocalDiskRefTreeDatabaseTest shall use MockSystemReader Ensure LocalDiskRepositoryTestCase#setup fully uses MockSystemReader Ensure we use MockSystemReader in tests Override FileBasedConfig's save method in MockConfig Remove FileBasedConfig.load(boolean) introduced in d45219ba Disable debug log for FS in org.eclipse.jgit.test Bazel: enable logging for tests in org.eclipse.jgit.test LockFile: log exception if creation of lock file failed Stop using deprecated Constants.CHARACTER_ENCODING Change-Id: I48c585f3c9287be7d6ddb6b01a1955444e13fa31 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * Fix NPE in RebaseTodoFile#parseCommentsMatthias Sohn2019-08-191-5/+7
| | | | | | | | | | | | | | | | Change-Id: I5487f3c2609eaf2a0ddf71ebb2f6c9701fb7600c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * Fix NPE in ObjectIdOwnerMap#getMatthias Sohn2019-08-181-0/+3
| | | | | | | | | | | | | | | | Change-Id: I3812961a27ac410d610ef50c73a28f21bb05ae79 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * Fix NPE in CommitOnlyTest#getHeadMatthias Sohn2019-08-181-0/+6
| | | | | | | | | | | | | | | | Change-Id: I05abd00d151cf9834d1a097dd16dc280b62a7edd Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * FileUtils#lastModifiedInstant should not log error if path doesn't existMatthias Sohn2019-08-181-1/+7
| | | | | | | | | | | | | | | | Change-Id: Id8447735beb24becb41612d3d29d5351f8273d22 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * Cache user global and system-wide git configurationsMatthias Sohn2019-08-1816-227/+337
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far the git configuration and the system wide git configuration were always reloaded when jgit accessed these global configuration files to access global configuration options which are not in the context of a single git repository. Cache these configurations in SystemReader and only reload them if their file metadata observed using FileSnapshot indicates a modification. Change-Id: I092fe11a5d95f1c5799273cacfc7a415d0b7786c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
| | | * Avoid setup and saving FileStoreAttributes compete for ~/.gitconfig lockMatthias Sohn2019-08-161-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FS determines FileStore attributes in a background thread and tries to save the results to the global git configuration. This competed with LocalDiskRepositoryTestCase#setup trying to save changes to the same file requiring the same lock. This frequently led to one of the threads failing to acquire the lock. Fix this by first initiating determination of FileStore attributes which then uses a MockSystemReader not using a userConfig stored to disk which avoids this race for the lock. Change-Id: I30fcd96bc15100f8ef9b2a9eb3320bb5ace97c67 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * Add missing dependencies for running FS_POSIXTest in EclipseMatthias Sohn2019-08-161-0/+2
| | | | | | | | | | | | | | | | Change-Id: I35fcdfab55ff02943f6185b232e01ce9cfe151a9 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * Fix javadoc for SystemReader#getInstanceMatthias Sohn2019-08-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | The existing javadoc was copied from another method and not adapted. Change-Id: I39a7e5d719b2c379de9bd1a4710a55a73700c6f0 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * Improve retry handling when saving FileStoreAttributes failsMatthias Sohn2019-08-133-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - fix handling of interrupts in FileStoreAttributes#saveToConfig - increase retry wait time to 100ms - don't wait after last retry - dont retry if failure is caused by another exception than LockFailedException Change-Id: I108c012717d2bcce71f2c6cb9cf0879de704ebc2 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * Merge "Ensure FSTest uses MockSystemReader" into stable-5.1David Pursehouse2019-08-121-0/+2
| | | |\
| | | | * Ensure FSTest uses MockSystemReaderMatthias Sohn2019-08-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tests shall not modify ~/.gitconfig. When running tests with bazel this test failed since bazel isolates tests in a sandbox. Change-Id: I7dd092afd14972da58a95eb7c200d353f0959fa1 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * | Make supportsAtomicCreateNewFile return true as defaultVishal Devgire2019-08-123-1/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The method org.eclipse.jgit.util.FS.supportsAtomicCreateNewFile() should default to true as mentioned in docs [1] org.eclipse.jgit.util.FS_POSIX.supportsAtomicCreateNewFile() method will set the value to false if the git config core.supportsatomiccreatenewfile is not set. It should default to true if the configuration is undefined. [1] https://github.com/eclipse/jgit/blob/4169a95a65683e39e7a6a8f2b11b543e2bc754db/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX.java#L372 Bug: 544164 Change-Id: I16ccf989a89da2cf4975c200b3228b25ba4c0d55 Signed-off-by: Vishal Devgire <vishaldevgire@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * | Update orbit to R20190602212107-2019-06 to enable backports from masterMatthias Sohn2019-08-1215-91/+149
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | update - org.apache.httpcomponents.httpclient to 4.5.6.v20190503-0009 - org.apache.httpcomponents.httpcore to 4.4.10.v20190123-2214 - com.jcraft.jsch" version to 0.1.55.v20190404-1902 - org.mockito to 2.23.0.v20190527-1420 add its dependencies - net.bytebuddy.byte-buddy 1.9.0.v20181107-1410 - net.bytebuddy.byte-buddy-agent 1.9.0.v20181106-1534 - org.objenesis to 2.6.0.v20180420-1519 CQ: 18303 (objenesis) CQ: 18703 (httpclient) CQ: 18704 (httpcore) CQ: 19588 (jsch) CQ: 20214 (mockito) CQ: 20215 (butebuddy) CQ: 20216 (bytebuddy-agent) Change-Id: I8d76375de867e32b7818449f843b7c053a717b5e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * Handle InvalidPathException in FS_POSIX#createNewFileAtomicMatthias Sohn2019-08-121-1/+2
| | | | | | | | | | | | | | | | | | | | Bug: 547400 Change-Id: Ic3541e360a2968ba3532a3d3fa4828b0d0463c02 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * Ensure root cause of lock creation failures is loggedMatthias Sohn2019-08-121-3/+7
| | | | | | | | | | | | | | | | Change-Id: I91cdf1e085a29c0aabd6d22c6ebe848b2d75f42c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * Implement toString in MockSystemReader and MockConfigMatthias Sohn2019-08-111-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | This helps when debugging. Change-Id: I3d72e1ea207ba60be77a7a9a840abb71ade1271c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * LocalDiskRefTreeDatabaseTest shall use MockSystemReaderMatthias Sohn2019-08-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It missed to call the setup() method of its super class which prepares the MockSystemReader Change-Id: I39858749f8d0115fc6ac7edc8847ffb2bbc85c33 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * Ensure LocalDiskRepositoryTestCase#setup fully uses MockSystemReaderMatthias Sohn2019-08-112-21/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FS#getFileStoreAttributes used the real userConfig and not the mocked one. This led to test errors when running tests with Bazel since it sandboxes tests which prevents they can write to ~/.gitconfig. Fix this by first preparing the MockedSystemReader and the mocked config before calling FS#getFileStoreAttributes. Also fix ConfigTest which broke due to this change since it inherits from LocalDiskRepositoryTestCase and calls its setup method which was changed here. We can no longer assert by comparing plain text since FS adds FileStoreAttributes to the mocked userConfig. Also the default options seen by this test changed since we now use a mocked config. Change-Id: I76bc7c94953fe979266147d3b309a68dda9d4dfe Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * Ensure we use MockSystemReader in testsMatthias Sohn2019-08-103-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we use the default system reader FileStoreAttributes cannot persist attributes in userConfig when tests run in Bazel due to sandboxing. Hence we need to ensure that all tests use MockSystemReader (and especially a mocked userConfig). Change-Id: Ic1ad8e2ec5a150c5433434a5f6667d6c4674c87d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * Override FileBasedConfig's save method in MockConfigMatthias Sohn2019-08-101-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ensures we don't try to persist MockConfig using its superclasses save() method which fails with an NPE since MockConfig has no backing file. Change-Id: Ifba2d24c9438bb30d3828ed31a4c131f940b45eb Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * Remove FileBasedConfig.load(boolean) introduced in d45219baMatthias Sohn2019-08-103-46/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can't add this method to the super class StoredConfig since that abstracts from filesystem storage. MockSystemReader.MockConfig is a StoredConfig and is also used by tests for dfs based storage. Hence remove this leaky abstraction. This implies we always use the fallback FileStoreAttributes which means a config file modification is considered racy within the first 2 seconds. This should not be an issue since typically configs change rarely and re-reading a config within the racy period is relatively cheap since configs are small. Change-Id: Ia2615addc24a7cadf3c566ee842c6f4f07e159a5 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * Disable debug log for FS in org.eclipse.jgit.testMatthias Sohn2019-08-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This was enabled unintentionally in 06fc6c7c and spams the test logs. We can enable this when needed. Change-Id: I9f3042c0e285ff236be65fcc02bdcfdb90efc3af Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * Bazel: enable logging for tests in org.eclipse.jgit.testMatthias Sohn2019-08-103-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - use slf4j-simple for logging in test runs - for log configuration see https://www.slf4j.org/api/org/slf4j/impl/SimpleLogger.html Change-Id: I9f0a532644b31162c867cd0d63f083296eaf6be5 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>