Skip to main content
aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2016-10-13HttpClientConnection: Register connection socket factory for httpMatthias Sohn1-1/+4
It is necessary to register a socket connection factory to prevent the "http protocol is not supported" error when connecting over a proxy. Change-Id: Iedf554acef841f52c1f2e3401ef0a0583ac5253b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-10-13Add dependency to org.apache.commons.logging used by Apache HttpClientMatthias Sohn1-0/+1
Without this dependency running JGit CLI in Eclipse will hit ClassNotFoundExceptions when HttpClient is trying to log something. Change-Id: I2d50d9a18fac4c302de2c3a16c07f90ce3e5072e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-10-12Content type constants used in lfs should be finalMatthias Sohn2-2/+19
Change-Id: Ia56a9f58e336c25255a81d9402e198e5ce5da442 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-10-12AmazonS3: ensure that errorStream is closedMatthias Sohn1-12/+20
Change-Id: I2abde5dbd4b785d70b7bc0b77188c0a075130eeb Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-10-12Merge "Add toString() to CherryPickCommand and ResetCommand"Matthias Sohn2-0/+19
2016-10-10Merge branch 'stable-4.5'Matthias Sohn4-13/+4
* stable-4.5: pgm: Fix misspelled key of an externalized string Add missing online help for Ketch server type option in CLI daemon Remove wrong junit dependencies in org.eclipse.jgit.pgm Change-Id: I9cac024c0b488101b539c713b0f5ffc8c01b55bd Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-10-10Fix symlink content comparison on MacOS in tree walkThomas Wolf4-8/+295
Symlinks on MacOS are written as UTF-8 NFD, but readSymbolicLink().toString() converts to NFC with potentially fewer bytes. May occur in particular if the link target has non-ASCII characters for which the NFC and NFD encodings differ. This may lead to an EOFException: Short read of block. This causes all kinds of weird effects in EGit, ranging from failing rebases (which report the exception to the user) to EGit decorations in the navigator silently disappearing (and never coming back). * Rename readContentAsNormalizedString() to readSymlinkTarget() as it's called only for symlinks. Also make it protected. * Fix by allowing the read to succeed even if less than the expected number of bytes are returned by the entry's input stream. * Override in FileTreeIterator to use fs.readSymlink() directly. Includes a new MacOS-only test. Change-Id: I264c5972d67b1cbb1ed690580f5706e671b9affd Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-10-10Merge "Fix CheckoutCommand to return updated files even on NONDELETED status"Christian Halstrick3-3/+60
2016-10-09Add toString() to CherryPickCommand and ResetCommandMatthias Sohn2-0/+19
Change-Id: Ie2dd87943350e3b0a2df72a70e5219139d110a8f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-10-01pgm: Fix misspelled key of an externalized stringMatthias Sohn1-1/+1
Bug: 502107 Change-Id: I76d0981c8463b63bd049f50cdc7d549fa0604b3c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-10-01Add missing online help for Ketch server type option in CLI daemonMatthias Sohn2-1/+3
Change-Id: I19d27bbdbfdb1c7a5a688e41dfcba73a142a1afd Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-10-01Remove wrong junit dependencies in org.eclipse.jgit.pgmMatthias Sohn1-11/+0
Bug: 503010 Change-Id: I8fa99f53020af41eb15c1f63b6f3ba094d56bfef Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-10-01Delay inserter.flush in WalkFetchConnectionZhen Chen1-3/+7
Spawn an ObjectReader from the ObjectInserter, so the flush can be delayed at the end of the fetch. Change-Id: I35fe8c8370c06c25262645202aec2b1318057c19 Signed-off-by: Zhen Chen <czhen@google.com>
2016-09-30Remove unused code from class RepositoryRüdiger Herrmann1-9/+0
The package-private method Repository::gitInternalSlash() is not referenced from anywhere within the package. Last uses were removed with 0f8743d4 "Remove deprecated Tree, TreeEntry, FileTreeEntry and friends" 6e9fdce9 "Kill GitIndex" Signed-off-by: Rüdiger Herrmann <ruediger.herrmann@gmx.de> Change-Id: I514bf684ad0da808f6523e9e46db9674a25e1fb5
2016-09-27Fix CheckoutCommand to return updated files even on NONDELETED statusChristian Halstrick3-3/+60
CheckoutCommand was not returning updated and removed files in case of an overall status of NONDELETED. That's status which occurs especially on the Windows platform when Checkout wanted to delete files but the filesystem doesn't allow this. The situation is more seldom on linux/mac because open filehandles don't stop a deletion attempt and checkout succeeds more often. Change-Id: I4828008e58c09bd8f9edaf0f7eda0a79c629fb57
2016-09-24Merge branch 'stable-4.5'Matthias Sohn2-1/+147
* stable-4.5: Fix carrying over flags during a RevWalk Change-Id: Ibf4573c5664271dfa7a6ecc3ede6eaad749f89d8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-09-24Merge "Fix carrying over flags during a RevWalk" into stable-4.5Shawn Pearce2-1/+147
2016-09-23Fix carrying over flags during a RevWalkChristian Halstrick2-1/+147
There was a bug when carrying over flags from a merge commit to its non-first parents. The first parent of a merge commit was handled differently and correct but the non-first parents are handled by a recursive algorithm. Flags should be copied from the root merge commit to parent-2, to grandparent-2, ... up to the limit of STACK_DEPTH==500 parents-levels. But the recursive algorithm was always copying only to the direct parents of the merge commit and not the grand*-parents. This seems to be no problem when commits are handled in a strict date order because then copying only one level is no problem if children are handled before parents. But when commits are not seperated anymore by distinctive correct dates (e.g. because all commits have the same date) then it may happen that a merge-parent is handled before the merge commit and when dealing later with the merge commit one has to copy flags down to more than one level Bug: 501211 Change-Id: I2d79a7cf1e3bce21a490905ccd9d5e502d7b8421
2016-09-23Merge "Use consistent feature and category names"Matthias Sohn4-8/+7
2016-09-23RepositoryCache#unregisterAndCloseRepository: Remove unused db parameterDavid Pursehouse1-3/+2
Change-Id: Ibee48cba85089324dc8db45066d311ad5db4f3ee Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2016-09-23[releng] maven: compile against the Java 1.8 librariesThomas Wolf1-5/+0
Remove the JDK_HOME settings that were introduced to build against the Java 1.7 libraries. Now that the minimum requirement is Java 1.8, this is wrong and prevents use of Java 1.8 features. Change-Id: I91a194c9449d7810ef02b038907dbbc708e600a5 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2016-09-22Use consistent feature and category namesMatthias Sohn4-8/+7
These names are presented to users when they install JGit so they should be consistent. Bug: 496101 Change-Id: I88a1abd8c3717d9a2f958e3a39edb2dbce3a415b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-09-22pgm, test: Add missing dependency for buck buildDavid Pursehouse2-0/+2
Change-Id: I26d69fb6d35c6fb120360ef143d1b1f565d4014c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-09-22DfsBlockCache: Suppress warnings about unchecked conversion of Ref<T>David Pursehouse1-0/+2
There are already suppressions for the same warnings in other parts of this class. Change-Id: Ic3b45525c6c8200cba975d14c7650cedb4409a4d Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2016-09-22LfsServerTest: Remove unnecessary suppression of 'restriction' warningDavid Pursehouse1-1/+0
Change-Id: I23386808848746d201ca1ac13f114c06fc8e86c5 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2016-09-22WrappedRequest: Don't use deprecated ServletRequestWrapper#realPathDavid Pursehouse1-1/+1
Change-Id: I268e66d2299a1a12f7ae44b67a6b947339038245 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2016-09-22Suppress deprecation warnings related to UploadPackLoggerDavid Pursehouse2-1/+3
UploadPackLogger is deprecated but will not be removed until JGit version 5.0. Suppress the unavoidable deprecation warnings on usages of the interface that are kept for backwards compatibility. Add a TODO so that we don't forget to remove it in 5.0. Change-Id: Id248002b9bdf23db192427196d54c722a012106c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2016-09-22AppServer: Remove unnecessary 'unused' suppressionsDavid Pursehouse1-4/+2
Change-Id: Ic27106f38af14833147f739179c3ef8ec6b6ee31 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2016-09-22HttpClientConnection: Don't use deprecated HttpClient classesDavid Pursehouse2-45/+60
- raise minimum version for HttpClient packages to 4.3 since some of the used classes aren't available in older versions - recompute OSGi uses clauses Change-Id: I8f0bff1433762561e02f7439db27a6a9e846c290 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-09-21Fix wrong @since tags introduced by 1beb3ccdMatthias Sohn3-3/+3
1beb3ccd1ed3be0dde703a604deeff3a4b9f27eb was submitted in 4.6.0-SNAPSHOT Change-Id: I33e027dbd0995ba36491bd9e2d4b3c84f9f0abd6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-09-21Merge branch 'stable-4.5'Matthias Sohn2-5/+14
* stable-4.5: Turn off doclint also during Maven site generation Prepare 4.5.1-SNAPSHOT builds JGit v4.5.0.201609210915-r Unconditionally close repository in unregisterAndCloseRepository Change-Id: Ibfd11669cd74d2e62b014c18fd39b646b200c8c5 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-09-21Turn off doclint also during Maven site generationMatthias Sohn1-0/+11
Change-Id: Iefc77114de21e7a101642f5c3a8f0fb317886ba2 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-09-21Prepare 4.5.1-SNAPSHOT buildsMatthias Sohn56-302/+302
Change-Id: I3305e8a09a3fb06f25a316cff2bdbb551d3ade68 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-09-21JGit v4.5.0.201609210915-rv4.5.0.201609210915-rMatthias Sohn56-59/+59
Change-Id: Idc02a1a1d74f84605d764c239803f0cfbad94eb7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-09-21Unconditionally close repository in unregisterAndCloseRepositorySaša Živkov1-5/+3
Repository.close() method is used when reference counting and expiration needs to be honored. The RepositoryCache.unregisterAndCloseRepository method should close the repository unconditionally. This is also indicated from its javadoc. Change-Id: I19392d1eaa17f27ae44b55eea49dcff05a52f298
2016-09-20Merge "Add ReceivedPackStatistics for PackParser"Shawn Pearce3-2/+268
2016-09-20Change JGit minimum execution environment to JavaSE-1.8Matthias Sohn65-245/+100
Bug: 500059 Change-Id: I47f3f6749a67da52029f84e002d9b155ed56d2b7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-09-20Move AtomicObjectOutputStream to lfs/internalChristian Halstrick10-10/+20
The class AtomicObjectOutputStream should be available to all lfs related classes, not only to the server side. Move the class from org.eclipse.jgit.lfs.server.fs to org.eclipse.jgit.lfs.internal to achieve that. Change-Id: I028e1c9ec7c21f316340b21d558b9a6b77e2060d
2016-09-20Add built-in LFS smudge filter for local caseChristian Halstrick9-44/+293
Adds a JGit built-in implementation of the "git lfs smudge" filter. This filter should do the same as the one described in [1] besides that it only supports the local case when the lfs objects are already present in the media directory. Remote cases where download of LFS objects from an LFS server is needed will be done in a later commit. [1] https://github.com/github/git-lfs/blob/master/docs/man/git-lfs-smudge.1.ronn Change-Id: I8ff661d4edd3667ef7f86f3b4fa33e568eb4c8f4
2016-09-20Add built-in LFS clean filterChristian Halstrick12-7/+616
Adds a JGit built-in implementation of the "git lfs clean" filter. This filter should do the same as the one described in [1]. But since this filter is written in Java and can be called by JGit without forking new processes it should be much faster [1] https://github.com/github/git-lfs/blob/master/docs/man/git-lfs-clean.1.ronn Change-Id: If60e387e97870245b4bd765eda6717eb84cffb1d
2016-09-20Add configuration parameter to enable built-in hooks/filtersChristian Halstrick3-1/+33
If the configuration parameter filter.<filterDriverName>.useJGitBuiltin is set to true then for all corresponding filters JGit will try to execute the built-in filter instead of the filter-command which is defined in git configuration. It will fallback to the non-built-in filters if no built-in filters are registered or if constructing them leads to exceptions. If set to false JGit will not try to execute built-in filters for the specified filter driver. Example: The configuration contains the following lines [filter "lfs"] clean = git-lfs clean -- %f smudge = git-lfs smudge -- %f useJGitBuiltin = true Addtionally the .gitattributes file in the root of the working tree contains: *.bin filter=lfs In this case when new content is added similar to "git add 1.bin" then the following will happen: - jgit will check whether a built-in command factory was registered for the command "jgit://builtin/lfs/clean". If that is true the factory is used to create a built-in filter command and that command is used to filter the content - Otherwise jgit will call the external program "git lfs clean ..." to do the filtering Change-Id: Idadb1db06b1e89e7031d7ed6319904973c367d38
2016-09-20Add support for built-in smudge filtersChristian Halstrick4-37/+170
JGit supports smudge filters defined in repository configuration. The filters are implemented as external programs filtering content by accepting the original content (as seen in git's object database) on stdin and which emit the filtered content on stdout. This content is then written to the file in the working tree. To run such a filter JGit has to start an external process and pump data into/from this process. This commit adds support for built-in smudge filters which are implemented in Java and which are executed by jgit's main thread. When a filter is defined in the configuration as "jgit://builtin/<filterDriverName>/smudge" then JGit will lookup in a static map whether a builtin filter is registered under this name. If found such a filter is called to do the filtering. The functionality in this commit requires that a program using JGit explicitly calls the JGit API to register built-in implementations for specific smudge filters. In follow-up commits configuration parameters will be added which trigger such registrations. Change-Id: Ia743aa0dbed795e71e5792f35ae55660e0eb3c24
2016-09-20Add support for built-in clean filtersChristian Halstrick6-0/+476
JGit supports clean filters defined in repository configuration. The filters are implemented as external programs filtering content by accepting the original content (as seen in the working tree) on stdin and which emit the filtered content on stdout. To run such a filter JGit has to start an external process and pump data into/from this process. This commit adds support for clean filters which are implemented in Java and which are executed by jgit's main thread. When a filter is defined in the configuration as "jgit://builtin/<filterDriverName>/clean" then JGit will lookup in a static map whether a filter is registered under this name. If found such a filter is called to do the filtering. The functionality in this commit requires that a program using JGit explicitly calls the JGit API to register built-in implementations for specific clean filters. In follow-up commits configuration parameters will be added which trigger such registrations. Other commits will add implementations for lfs filters. Change-Id: I0344d3c54801c9a46e5a606c5df17e5f2e17b2be
2016-09-19Add ReceivedPackStatistics for PackParserMasaya Suzuki3-2/+268
This is like PackStatistics, but for PackParser. Change-Id: I854215c0956fd0b36843d631780be303e021b8be Signed-off-by: Masaya Suzuki <masayasuzuki@google.com>
2016-09-19Prepare 4.6.0-SNAPSHOT buildsMatthias Sohn56-304/+304
Change-Id: Id2eafc331ee32c332c2a9b867b05c260beb0d10f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-09-14Handle all values of branch.[name].rebaseThomas Wolf5-78/+174
BranchConfig treated this config property as a boolean, but git also allows the values "preserve" and "interactive". Config property pull.rebase also allows the same values. Replace private enum PullCommand.PullRebaseMode by new public enum BranchConfig.BranchRebaseMode and adapt all uses. Add a new setter to PullCommand. Note: PullCommand will treat "interactive" like "true", i.e., as a non-interactive rebase. Not sure how "interactive" should be handled. At least it won't balk on it. Bug: 499482 Change-Id: I7309360f5662b2c2efa1bd8ea6f112c63cf064af Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2016-09-14Ignore trailing spaces in directory rule patternsAndrey Loskutov5-6/+91
Bug: 500967 Change-Id: I7fabc2654af97011c62f46d5c30ee992341e45e2 Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
2016-09-13Add support for post-commit hooksMartin Goellnitz6-6/+204
Change-Id: I6691b454404dd4db3c690ecfc7515de765bc2ef7 Signed-off-by: Martin Goellnitz <m.goellnitz@outlook.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-09-05Don't log error if system git config does not existMatthias Sohn7-23/+192
- enhance FS.readPipe to throw an exception if the external command fails to enable the caller to handle the command failure - reduce log level to warning if system git config does not exist - improve log message Bug: 476639 Change-Id: I94ae3caec22150dde81f1ea8e1e665df55290d42 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-09-05Add missing dependency to slf4j-log4j bridgeMatthias Sohn1-1/+2
Without the bridge JGit tests don't show log output in Eclipse console. Change-Id: I7acce1f1787960b5ca98377cb5c7f599a8a220b5 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>

Back to the top