summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Prepare 4.3-SNAPSHOT buildsMatthias Sohn2016-04-0556-59/+59
| | | | | Change-Id: Ib831f8870938113bd5338763f90a07d5c108b1de Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Implement DIR_NO_GITLINKSPreben Ingvaldsen2016-04-059-20/+248
| | | | | | | | | 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>
* JGit v4.3.0.201603230630-rc1v4.3.0.201603230630-rc1Matthias Sohn2016-03-2356-59/+59
| | | | | Change-Id: I10835e5aa3618e5033424595942cc1649152cb24 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Merge "Make the FileLfsRepository thread safe"Matthias Sohn2016-03-223-25/+51
|\
| * Make the FileLfsRepository thread safeSaša Živkov2016-03-223-25/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The FileLfsRepository.out member could have been accessed from multiple threads which would corrupt the content. Don't store the AtomicObjectOutputStream in the FileLfsRepository.out but move it to the ObjectUploadListener which is instantiated per-request. Add a parallel upload test. Change-Id: I62298630e99c46b500d376843ffcde934436215b Signed-off-by: Saša Živkov <sasa.zivkov@sap.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Merge "Add missing @Deprecated annotation"Jonathan Nieder2016-03-111-0/+1
|\ \
| * | Add missing @Deprecated annotationJonathan Nieder2016-03-111-0/+1
| | | | | | | | | | | | | | | | | | Noticed by error-prone (http://errorprone.info/bugpattern/DepAnn). Change-Id: If8dcc2dd6d7cabffc95e10f8357ce31c12cf6b1c
* | | Fix wrong whitespaces.Yuxuan 'fishy' Wang2016-03-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This change replaced some tabs with spaces introduced in change I8b3765713599e34f1411f9bbc7f575ec7c2384e0. Change-Id: Ia5c23b38c9fbbb46f150e527347b61c64c8d9e87 Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
* | | Add ignoreRemoteFailures option to RepoCommandYuxuan 'fishy' Wang2016-03-111-11/+41
|/ / | | | | | | | | | | | | | | | | | | With ignoreRemoteFailures set to true, we can ignore remote failures (e.g. the branch of a project described in the manifest file does not exist), skip that project and continue to the next one, instead of fail the whole operation. Change-Id: I8b3765713599e34f1411f9bbc7f575ec7c2384e0 Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
* | Introduce FileModeStrategy to FileTreeIteratorPreben Ingvaldsen2016-03-112-20/+253
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge "Change visibility of DirCacheTree#getObjectId to public"Matthias Sohn2016-03-071-1/+9
|\ \
| * | Change visibility of DirCacheTree#getObjectId to publicPhilipp Marx2016-03-071-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | Allow access to the ObjectId of a DirCacheTree if known for low level integration code. Change-Id: I6f05b10c9ac781f5e8b38af4a19e653313c91fa8 Signed-off-by: Philipp Marx <smigfu@googlemail.com>
* | | Add EOL stream type detection to TreeWalkIvan Motsch2016-03-0723-255/+2160
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | 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 RebuildRefTree trying to add HEAD twice to RefTreeMatthias Sohn2016-03-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 14dfa70520 fixed the problem that HEAD wasn't added to the reftree when rebuilding the reftree in an empty repository where HEAD isn't yet resolvable. Since non-resolvable refs are filtered out by RefDatabase.getRefs(ALL) we have to add HEAD to the reftree explicitly in this special case. This fix resulted in another bug: rebuilding the reftree in a repository which has a resolvable HEAD failed with a DirCacheNameConflictException in RefTree.apply(). If HEAD is resolvable RefDatabase.getRefs(ALL) does not filter out HEAD. This results in two identical CREATE commands for HEAD which RefTree.apply() refuses to execute. Fix this by no longer creating a duplicate CREATE command for HEAD. See: I46cbc2611b9ae683ef7319dc46af277925dfaee5 Change-Id: I58dd6bcdef88820aa7de29761d43e2edfa18fcbe Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Fix apply patch which did not work with non-ascii charactersXinTong Wang2016-03-0316-7/+106
| | | | | | | | | | | | Bug: 483943 Change-Id: If28f64053d20ab1bee54245f223e952dc2fe392c Signed-off-by: XinTong Wang <xintong@ca.ibm.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Fix help text for option --enable of command debug-rebuild-ref-treeMatthias Sohn2016-03-012-1/+2
| | | | | | | | | | | | | | This fixes a MissingResourceException thrown when executing jgit debug-rebuild-ref-tree --help Change-Id: I637ea55084a913f5105ebf4cf2baef8b81877938 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Update Mars orbit repository to R20160221192158Matthias Sohn2016-02-263-9/+9
| | | | | | | | | | | | This version fixes signing of Apache httplclient. Change-Id: I81d7a643233386442bd31ee602669d2c88b68576 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Tests on Windows with URIish failIvan Motsch2016-02-251-0/+2
| | | | | | | | | | | | | | | | The reason is that URIish(URL) and URIish(String) make different parsing of path / rawPath with regard to drive letters. /C:/... for URL and C:/... for String. This patch fixes the issue. Change-Id: I8e2013fff30b7bb198ff733c038e21366667b8a0 Signed-off-by: Ivan Motsch <ivan.motsch@bsiag.com>
* | Remove the profiles for selecting the target platformMatthias Sohn2016-02-191-37/+1
| | | | | | | | | | | | | | | | | | Target platform can be configured directly, e.g.: $ mvn clean install -Dtarget-platform=jgit-4.6 Set the default to use the Mars target platform. Change-Id: Ib6075af19be88fa418ecbe4dd7a217d9879e178a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Add Neon target platformMatthias Sohn2016-02-183-0/+116
| | | | | | | | Change-Id: I24cceef84a9351b84ca46635a3898de113f1046c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Remove unused package export from bundle org.eclipse.jgit.lfs.testMatthias Sohn2016-02-181-2/+1
|/ | | | | | | | This may have caused the spurious compile errors sometimes observed in Eclipse since org.eclipse.jgit.lfs.lib is a split package to enable testing package private code in bundle org.eclipse.jgit.lfs. Change-Id: I0294448965de8ad8c254b26382386ef2b9f6e863 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Merge "Support Amazon S3 based storage for LFS"Sasa Zivkov2016-02-1711-11/+915
|\
| * Support Amazon S3 based storage for LFSMatthias Sohn2016-02-1711-11/+915
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a storage implementation storing large objects in Amazon S3. The AmazonS3Repository pre-signs download and upload requests. AWS access and secret key are expected to be in the $HOME/.aws/credentials file in the following format: [default] accessKey = ... secretKey = ... Use AWS version 4 request signing [1] because it is more secure and supported by all regions. The version 3 signing is not supported in newer regions. In follow up changes we should: - implement getVerifyAction() and do actual verification. Subclasses of S3Repository can implement caching for object meta data (size) in order to avoid extra roundtrips to S3. Verification should ensure that meta data store and content of S3 storage are in sync - HEAD request used in S3Repository.getSize() seems to always return Content-length 0 in contrast to the documentation [2]. So getSize() does detect if the object exists in S3 or not but in case the object exists it always returns size 0 [1] http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html [2] https://forums.aws.amazon.com/thread.jspa?threadID=223616 Change-Id: Ic47f094928a259e5264c92b3aacf6d90210907a8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
* | Introduce specific WantNotValidException for serversShawn Pearce2016-02-162-15/+96
| | | | | | | | | | | | | | | | Capture the internal "want X not valid" state as a specific subclass of PackProtocolException, allowing this to be more easily identified in server stack traces and wrapper application code. Change-Id: I4b1adb7497f396432da420b0f600ad25a261f912
* | smart HTTP server: Pass along "want X not valid" to clientShawn Pearce2016-02-162-21/+36
|/ | | | | | | | | | | | | If the client sends a SHA-1 that the server does not recognize echo this back to the client with an explicit error message instead of the generic "internal server error". This was always the intent of the implementation but it was being dropped on smart HTTP due to the UploadPackServlet catching the PackProtocolException, discarding the buffered message UploadPack meant to send, and sending along a generic message instead. Change-Id: I8d96b064ec655aef64ac2ef3e01853625af32cd1
* Merge branch 'stable-4.2'Matthias Sohn2016-02-162-2/+2
|\ | | | | | | | | | | | | | | * 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-152-2/+2
| |\ | | | | | | | | | stable-4.2
| | * Revert "Fix warnings about unchecked conversion of MergeResult"Shawn Pearce2016-02-152-2/+2
| | | | | | | | | | | | | | | | | | | | | This reverts commit 979fa19110df0906a82e92e32d7d3ccf7eca3712. Breaks API. Change-Id: I54af657898d49f64d6906fe3edfb6b08e996d901
* | | Merge branch 'stable-4.2'Matthias Sohn2016-02-1532-1882/+1923
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-1512-31/+17
| | |/ | |/| | | | | | | | | | Change-Id: Ibc3e2f3372e1a65732dd6d3c71cec53fb1aa15e2 Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * | Fix warnings about unchecked conversion of MergeResultDavid Pursehouse2016-02-152-2/+2
| | | | | | | | | | | | | | | Change-Id: I1490b2209fa7b39676849c624adbc262a672f6df Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * | MockServletConfig: Fix warning about unchecked conversion of EnumerationDavid Pursehouse2016-02-151-1/+1
| | | | | | | | | | | | | | | Change-Id: Ic5ce6d220e3b644032819ce4b2f31c669be1cdb9 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>
| * | Suppress "unchecked cast" warnings related to UploadPackFactory.DISABLEDDavid Pursehouse2016-02-152-0/+2
| | | | | | | | | | | | | | | Change-Id: Id74694e18fec326df2b04eb796b46ccc6484b23f Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * | DiffAlgorithms: Fix warnings about variable hidingDavid Pursehouse2016-02-151-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | Local variables/parameters named 'db' and 'cmp' were hiding class member variables of the same name. Change-Id: I98b770587aaf73744a93e6a3ee33d131a9fa91e9 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>
| * | DirCacheCGitCompatabilityTest: Open TreeWalk in try-with-resourceDavid Pursehouse2016-02-151-11/+12
| | | | | | | | | | | | | | | Change-Id: I81a8bd2aba7eb0a6efaea5d6f7720aa725052157 Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * | DirCacheCheckoutMaliciousPathTest: Open Git and RevWalk in t-w-rDavid Pursehouse2016-02-151-60/+61
| | | | | | | | | | | | | | | Change-Id: Iacb4e25f0ada74b1a01e448216cb02c7ec18b2d7 Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * | DirCacheIteratorTest: Open TreeWalk instances in try-with-resourceDavid Pursehouse2016-02-151-87/+94
| | | | | | | | | | | | | | | Change-Id: If23597acaebf2295b85411bf87bc0292d5dc789e Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * | ForPathTest: Open TreeWalk in try-with-resourceDavid Pursehouse2016-02-151-11/+12
| | | | | | | | | | | | | | | Change-Id: Ie4d0eb9c0fe1d8b8f41da161e701137cd7dd178f Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * | GitConstructionTest: Open Git instance in try-with-resourceDavid Pursehouse2016-02-151-5/+6
| | | | | | | | | | | | | | | Change-Id: Iddf658acd1c78161d6028cfcfb7e5c73534ae40b Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * | IndexDiffTest: Open Git instances in try-with-resourcesDavid Pursehouse2016-02-151-334/+340
| | | | | | | | | | | | | | | Change-Id: I7fa2d16561982ddfde053f2fe78135c114b66b1d Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * | ManifestParserTest: Don't use deprecated StringBufferInputStreamDavid Pursehouse2016-02-151-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | InMemoryRepository: Remove unused RevWalk from batch method signatureDavid Pursehouse2016-02-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The RevWalk given in the arguments is not used. According to the comment at the top of the method, a new RevWalk is intentionally used in the implementation. Remove the unused argument. Change-Id: Iec81a1341d5bf377801475845b96a465753096ef Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * | IndexModificationTimesTest: Open Git instances in try-with-resourceDavid Pursehouse2016-02-151-51/+52
| | | | | | | | | | | | | | | Change-Id: If52c071b71f5df822b1ac276a6f665515f6c9d00 Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * | InterIndexDiffFilterTest: Open TreeWalk in try-with-resourceDavid Pursehouse2016-02-151-32/+37
| | | | | | | | | | | | | | | Change-Id: Ie0046771b1ab1c9784d9a3bb597a9d76c6c3017d Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>