summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm
Commit message (Collapse)AuthorAgeFilesLines
* Prepare 6.3.1-SNAPSHOT buildsMatthias Sohn2022-09-123-46/+46
| | | | Change-Id: I44e159eca4131880d74d3078060e7e20f9b5ce76
* JGit v6.3.0.202209071007-rv6.3.0.202209071007-rMatthias Sohn2022-09-073-4/+4
| | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: Iea3fae9f6f6c5fb0a79f7684334a3e0059738c4f
* JGit v6.3.0.2022009070944-rMatthias Sohn2022-09-073-4/+4
| | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: I3cc78dbcf8c7970e80bf1499751611110ec2b30b
* Prepare 6.3.0-SNAPSHOT buildsMatthias Sohn2022-08-173-4/+4
| | | | Change-Id: Ie398b651c5308ec86812bf01fcc563d3e679c828
* JGit v6.3.0.202208161710-m3v6.3.0.202208161710-m3Matthias Sohn2022-08-163-4/+4
| | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: I0954d11a1f35eff196b157df3aa8386476c48a7e
* Fix DefaultCharset bug pattern flagged by error proneDavid Ostrovsky2022-06-172-5/+18
| | | | | | | See more details in: [1]. [1] https://errorprone.info/bugpattern/DefaultCharset Change-Id: I3de0be57a2d74490a5b4e66801e9767b38f13bf9
* Use SystemReader#getDefaultCharset to read console inputDavid Ostrovsky2022-06-171-2/+3
| | | | | | | In I986f97a410 SystemReader.getDefaultCharset() that provides the locale-dependent charset the way JEP 400 recommends. Change-Id: I30560ac47e450070e3864325d153d45f1a66882c
* Prepare 6.3.0-SNAPSHOT buildsMatthias Sohn2022-06-073-46/+46
| | | | Change-Id: I092fdd2c35d85bf35e3ef700aa7078e6d304d977
* Adapt diff- and merge tool code for PGM and EGit usageAndre Bossert2022-06-022-155/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | see: https://git-scm.com/docs/git-mergetool * DiffTools and MergeTools * store FS, gitDir and workTree for usage without git repository (for EGit preferences) * add getUserDefinedToolNames() and getPredefinedToolNames() * replace getToolNames() with getAllToolNames() that combines the two lists and put default tool name (diff.tool or merge.tool) as first element (for EGit preferences) * FileElement: refactoring of getFile() and friends to have midName (LOCAL, REMOTE etc.) always added to the temp file name (also for EGit) * FileElement: added directory attribute that is used in getFile() to return path with workDir as parent * DiffTool and MergeTool * added errw.flush(), because sometimes stderr is not printed in case of die() * print e.getMessage() always to stderr * Moved toolname and prompt logic into managers * Exported internal packages required for egit.ui Bug: 356832 Change-Id: I71e7f4dc362169a7612ca4f6546a021bc4b2b5f4 Signed-off-by: Andre Bossert <andre.bossert@siemens.com> Signed-off-by: Tim Neumann <Tim.Neumann@advantest.com>
* Add availability check of pre-defined toolsAndre Bossert2022-06-014-37/+94
| | | | | | | | | | | | | | | | | see: https://git-scm.com/docs/git-difftool see: https://git-scm.com/docs/git-mergetool * now all available tools are printed with "--tool-help" * if no diff.tool or merge.tool is defined the first available pre-defined tool is used TODO: - add mergetools to difftools --> extra change or merge to this - return the exit-code of the tool to jgit / java runtime Bug: 356832 Change-Id: I20fb04e71ced981f5625020f461bbac24e6cec70 Signed-off-by: Andre Bossert <andre.bossert@siemens.com>
* Add filtering with help of DirCacheCheckout.getContent()Andre Bossert2022-05-302-46/+133
| | | | | | | | | | | | | | | | see: https://git-scm.com/docs/git-mergetool * refactoring of content (FileElement) handling * now the temporary files are already filled with filtered content in the calling classes (PGM), that can be used with EGit content too TODO: * keep the temporaries when no change detected and the user answers no to the question if the merge was successful Bug: 356832 Change-Id: I86a0a052d059957d4d152c1bb94c262902c377d2 Signed-off-by: Andre Bossert <andre.bossert@siemens.com>
* Add mergetool merge feature (execute external tool)Andre Bossert2022-05-254-69/+305
| | | | | | | | | | | | | | | | | see: https://git-scm.com/docs/git-mergetool * implement mergetool merge function (execute external tool) * add ExecutionResult and commandExecutionError to ToolException * handle "base not present" case (empty or null base file path) * handle deleted (rm) and modified (add) conflicts * handle settings * keepBackup * keepTemporaries * writeToTemp Bug: 356832 Change-Id: Id323c2fcb1c24d12ceb299801df8bac51a6d463f Signed-off-by: Andre Bossert <andre.bossert@siemens.com>
* Add command line support for "git mergetool"Andre Bossert2022-05-254-2/+218
| | | | | | | | | | | | | | | | | see: https://git-scm.com/docs/git-mergetool see: https://git-scm.com/docs/git-config * add command line support for "git mergetool" * add option handling for "--tool-help", "--tool=<mytool>", "--[no-]prompt", "--[no-]gui" * handle prompt * add MergeTools * add pre-defined mergetools * print merge actions --> no execute, will be done later Bug: 356832 Change-Id: I6e505ffc3d03f75ecf4bba452a25d25dfcf5793f Signed-off-by: Andre Bossert <andre.bossert@siemens.com>
* Add difftool compare feature (execute external tool)Andre Bossert2022-05-252-31/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | see: http://git-scm.com/docs/git-difftool * add CommandExecutor that handles tool execution with help of "jgit.FS" * it handles tool execution with temporary created "command file" --> for for all "command interpreters" and parameters with spaces etc. * using of external bash.exe at Windows (MinGW) if shell-script is used as difftool command. It can be enabled with parameter "jgit.usemsys2bash=auto" that checks if command contains ".sh" or enabled / disabled with "jgit.usemsys2bash=true|false" * added special handling for empty files (e.g. deleted, added etc.) that are named "/dev/null" * added creation and deletion of temporary files needed for compare * added own Exception class for reporting to pgm / command line / EGit * added prompt option handling before executing difftool * reworked trustExitCode option for specific difftool and override for all difftools from config and command line * tested with command line options "--[no]-trust-exit-code", "--tool=<toolname>", "--[no]-gui", --[no]-prompt * ContentSource * added close() methods to close / cleanup used resources (like ObjectReader TreeWalk etc.) * added isWorkingTreeSource() methods to check if file can be used from working tree instead of copy from "ObjectLoader / ObjectReader" to temporary file (fixes "difftool <commit> <commit>") Bug: 356832 Change-Id: I5462fb6dbe4ecfd9da7c74117fce4070bbfd4d7a Signed-off-by: Andre Bossert <andre.bossert@siemens.com> Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
* Prepare 6.2.0-SNAPSHOT buildsMatthias Sohn2022-03-033-46/+46
| | | | Change-Id: Ic2dde88bee3242169d6fa50956f8938f3fc4ba8e
* [pgm] Add describe --abbrev optionMatthias Sohn2022-03-022-0/+7
| | | | Change-Id: I8adf2fad21db71b43266d3f274143eee6bc9dce2
* Introduce a constant for the length of an abbreviated hash stringSebastian Schuberth2022-02-033-4/+13
| | | | | Signed-off-by: Sebastian Schuberth <sebastian.schuberth@bosch.io> Change-Id: I196d58a813f7caa1965af4cf8e2f977ed4cdc350
* [errorprone] Fix implicit use of platform default charsetMatthias Sohn2022-01-191-1/+3
| | | | Change-Id: I42f893c4248d8b00bf4aaf59cd528c43940f99e2
* Merge branch 'stable-6.0'Thomas Wolf2022-01-054-13/+8
|\ | | | | | | | | | | | | | | * stable-6.0: Use slf4j-simple instead of log4j for logging Update orbit to R20211213173813 Change-Id: I746b7fb71571020ce49f7b50fd675c9864327719 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
| * Merge branch 'stable-5.13' into stable-6.0Thomas Wolf2022-01-054-13/+8
| |\ | | | | | | | | | | | | | | | | | | | | | * stable-5.13: Use slf4j-simple instead of log4j for logging Update orbit to R20211213173813 Change-Id: I219ef3901c1d908b91bf9c8f00431b22686ff7a5 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
| | * Use slf4j-simple instead of log4j for loggingMatthias Sohn2021-12-314-13/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | JGit uses slf4j-api as logging API. The libraries - org.eclipse.jgit.http.test - org.eclipse.jgit.pgm - org.eclipse.jgit.ssh.apache.test - org.eclipse.jgit.test used the outdated log4j 1.2.15 which is EOL since years. Since both jgit command line and also the tests don't need sophisticated logging features replace log4j with the much simpler slf4j-simple log implementation. The org.slf4j.binding.simple 1.7.30 archive has only 25kB instead of 429kB for log4j 1.2.15 Applications using jgit are free to choose any other log implementation supporting slf4j API. Change-Id: I89e85cd3c76e954c3434622510975ce65dc227d4
| | * Prepare 5.13.1-SNAPSHOT buildsMatthias Sohn2021-09-083-43/+43
| | | | | | | | | | | | Change-Id: Ib2f689d8d13eab022da5b5e83d6d6bebc1bb81d3
| | * JGit v5.13.0.202109080827-rv5.13.0.202109080827-rMatthias Sohn2021-09-083-4/+4
| | | | | | | | | | | | | | | Change-Id: If3b2d4256712cc7e577c23e75c0d4ad940870e72 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * Prepare 5.13.0-SNAPSHOT buildsMatthias Sohn2021-09-013-4/+4
| | | | | | | | | | | | Change-Id: I2a1d7ab24d5ca718348f4ce3cda351553e48cd1f
| | * JGit v5.13.0.202109011149-rc1v5.13.0.202109011149-rc1Matthias Sohn2021-09-013-4/+4
| | | | | | | | | | | | | | | Change-Id: Id8d0970102f18e61a2fc7cf941267c9089d71c1a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | Prepare 6.0.1-SNAPSHOT buildsMatthias Sohn2021-11-293-44/+44
| | | | | | | | | | | | Change-Id: Iddb67ed9578293b83b8147aa18dd8319426f83d1
| * | JGit v6.0.0.202111291000-rv6.0.0.202111291000-rMatthias Sohn2021-11-293-4/+4
| | | | | | | | | | | | | | | Change-Id: I6441d9226e8131552bfafe1fb2c353f2e07e42ac Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | Prepare 6.0.0-SNAPSHOT buildsMatthias Sohn2021-11-243-4/+4
| | | | | | | | | | | | Change-Id: I4e06186cf62681767962e391331cc65bafddc205
| * | JGit v6.0.0.202111241155-rc1v6.0.0.202111241155-rc1Matthias Sohn2021-11-243-4/+4
| | | | | | | | | | | | | | | Change-Id: I35dc089a00ee12f83f506fb320d23762fa030063 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Add config reader for user-defined difftoolsAndre Bossert2021-12-081-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | see: http://git-scm.com/docs/git-difftool * add config reader for user-defined difftools * diff.tool * diff.guitool * difftool.prompt * difftool.trustExitCode * difftool.<tool>.path * difftool.<tool>.cmd * add pre-defined difftools * implemented "git difftool --tool-help" to verify config reader and pre-defined difftools Bug: 356832 Change-Id: Idde8fddbef61f3378ee565c6321570b3962d0e1d Signed-off-by: Andre Bossert <andre.bossert@siemens.com> Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
* | | Add command line support for "git difftool"Andre Bossert2021-11-255-0/+274
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | see: http://git-scm.com/docs/git-difftool * add command line support for "jgit difftool" * show supported commands with "jgit difftool --help" * added "git difftool --tool-help" to show the tools (empty now) * prepare for all other commands Bug: 356832 Change-Id: Ice0c13ef7953a20feaf25e7746d62b94ff4e89e5 Signed-off-by: Andre Bossert <andre.bossert@siemens.com> Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
* | | Prepare 6.1.0-SNAPSHOT buildsMatthias Sohn2021-11-243-44/+44
|/ / | | | | | | Change-Id: Ied07b1298bd32672a5025cec5079440ab9b9a100
* | Update Jetty to 10.0.6Matthias Sohn2021-11-221-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | - this is the same version eclipse platform currently uses - update servlet-api to 4.0 - configure keystore used by AppServer with Subject Alternative Names for host name and ip address to satisfy more strict SNI checking in Jetty 10. See https://github.com/eclipse/jetty.project/issues/5379 - add jetty bundles to JGit-dependency-bundles in the jgit p2 repository Bug: 571932 Bug: 576100 Change-Id: Ibd0240cf7ad4dc201947fd69707f517c3c1fc1c8
* | sshd: add support for ssh-agentThomas Wolf2021-11-031-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a simple SSH agent connector using JNA. Include com.sum.jna and com.sun.jna.platform in the target platform. JNA is used to communicate through Unix domain sockets with ssh-agent, and if on Windows, to communicate via shared memory with Pageant. The new bundle o.e.j.ssh.apache.agent is an OSGi fragment so that the java.util.ServiceLoader can find the provided factory without further ado in OSGi environments. Adapt both maven and bazel builds to include the new bundle. Manually tested on OS X, CentOS 7, and Win10 with Pageant 0.76. Tested by installing JGit built from this change into freshly downloaded Eclipse 2021-12 M1, and then doing git fetches via SSH with different ~/.ssh/config settings (explicit IdentityFile, without any but a key in the agent, with no keys and a key in the agent and IdentitiesOnly=yes (must fail)). Bug: 541274 Bug: 541275 Change-Id: I34e85467293707dbad1eb44d1f40fc2e70ba3622 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | Binary and CR-LF detection: lone CRs -> binaryThomas Wolf2021-10-312-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | C git considers not only files containing NUL bytes as binary but also files containing lone CRs. Implement this also for JGit. C git additionally counts printable vs. non-printable characters and considers files that have non_printable_count > printable_count / 128 also as binary. This is not implemented because such counting probably only makes sense if one looks at the full file or blob content. The Auto[CR]LF* streams in JGit look only at the first few KiB of a stream in order not to buffer too much. For the C git implementation, see [1]. [1] https://github.com/git/git/blob/7e27bd589d/convert.c#L35 Bug: 576971 Change-Id: Ia169b59bdbf1477f32ee2014eeb8406f81d4b1ab Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | Fix split package in bundle org.eclipse.jgit.ssh.jschMatthias Sohn2021-09-292-1/+2
| | | | | | | | | | | | | | | | The package org.eclipse.jgit.transport was split between org.eclipse.jgit and org.eclipse.jgit.ssh.jsch. Bug: 564544 Change-Id: I91d38e67c65ed97a880f8dc8f9559663b9eec33b
* | Enable compiler option --releaseMatthias Sohn2021-09-292-3/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ensures the compiler compiles against the public, supported and documented API for a specific VM version (here 11) [1]. This also means that we don't need EE descriptors in Eclipse anymore in order to ensure that only supported APIs of the selected Java version can be used. According to [2] if option --release is used --source and --target options can't be used. While we are at it also add default value for all new jdt core options added in Eclipse 4.21. [1] https://docs.oracle.com/en/java/javase/11/tools/javac.html [2] https://docs.oracle.com/en/java/javase/14/docs/specs/man/javac.html#option-release Change-Id: I852a5d7b0a3210751c15d79ec91915b4c01c41e2 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Bump minimum required Java version to 11Matthias Sohn2021-09-293-5/+9
| | | | | | | | | | | | Bug: 569917 Change-Id: Ifdcdb022a3f29321b4d10da1cc34acca68ed7b03 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Merge branch 'master' into nextMatthias Sohn2021-09-133-4/+8
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (38 commits) Revert "DFS block cache: Refactor to enable parallel index loading" GitServlet: allow to override default error handlers Silence API error for new interface method ProtocolV2Hook#onObjectInfo transport: add object-info capability Ignore IllegalStateException if JVM is already shutting down Update orbit to R20210825222808 for 2021-09 Update spotbugs-maven-plugin to 4.3.0 Update ant to 1.10.11 also in pom.xml DFS block cache: add additional stats to DfsReaderIoStats Update Orbit to S20210817231813 [gpg] Better GPG home directory determination FS: cleanup use of final modifier Ensure FS#searchPath only selects executable files RevWalk: getMergedInto's result is wrong on the second call DFS block cache: Refactor to enable parallel index loading [test] Create keystore with the keytool of the running JDK [gpg] Update to Bouncy Castle 1.69 [test] Create keystore with the keytool of the running JDK [sshd] Minor code clean-up Support commit.template config property ... Change-Id: I9f99e9a513a23c0c0d252334e79c351512d7355e
| * Ignore IllegalStateException if JVM is already shutting downMatthias Sohn2021-08-291-2/+6
| | | | | | | | | | | | | | | | | | Trying to register/unregister a shutdown hook when the JVM is already in shutdown throws an IllegalStateException. Ignore this exception since we can't do anything about it. Bug: 575367 Change-Id: Ic967c16c7f566c84778795315ab369e76668b364
| * [pgm] Fix default meta variable defined in StopOptionHandlerMatthias Sohn2021-06-281-1/+1
| | | | | | | | Change-Id: I703718e2476d40d34b11083414ac0ed5e34bf90a
| * Fix typo in javadoc of PathTreeFilterHandlerMatthias Sohn2021-06-281-1/+1
| | | | | | | | Change-Id: Icf0dc814baf0dc44addd102d9c03b821b4022a84
* | Merge branch 'master' into nextMatthias Sohn2021-06-151-0/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (47 commits) Fix @since from commit 64d0aaa2 Prepare 5.13.0-SNAPSHOT builds Prepare 5.12.1-SNAPSHOT builds Teach independent negotiation (no pack file) using an option "wait-for-done" JGit v5.12.0.202106070339-r [license-check] Update list of project dependencies [errorprone] Fix warning InputStreamSlowMultibyteRead [errorprone] Make operator precedence explicit in OpenSshConfigFile Update jetty to 9.4.41.v20210516 Prepare 5.1.17-SNAPSHOT builds JGit v5.1.16.202106041830-r Update Orbit to R20210602031627 Prepare 5.12.0-SNAPSHOT builds Fixing visibility for HostEntry constructors. JGit v5.12.0.202106021050-rc1 Prepare 5.12.0-SNAPSHOT builds JGit v5.12.0.202106011439-rc1 Clarify operator precedence to fix errorprone error Prepare 5.12.0-SNAPSHOT builds Update Orbit to S20210518003616 and ant to 1.10.10.v20210426-1926 ... Change-Id: I76a1f155201648a62df11a41a9e02d97f522d00f
| * Prepare 5.13.0-SNAPSHOT buildsMatthias Sohn2021-06-143-43/+43
| | | | | | | | Change-Id: Ie9cfc1eeb0eda7b2bbe744a22a7e4cfe6d59bc37
| * Prepare 5.12.1-SNAPSHOT buildsMatthias Sohn2021-06-133-43/+43
| | | | | | | | Change-Id: Idf266c34aa9a04cf9c5e0e09bcb415c13d773d4c
| * JGit v5.12.0.202106070339-rv5.12.0.202106070339-rMatthias Sohn2021-06-073-4/+4
| | | | | | | | | | Change-Id: I0fbfea2c83f1ce83f75130cc97591547032f1104 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Prepare 5.12.0-SNAPSHOT buildsMatthias Sohn2021-06-033-4/+4
| | | | | | | | | | Change-Id: Ifc72d3f3ac84b9c4055b95ec0093d877ffb09ab0 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * JGit v5.12.0.202106021050-rc1v5.12.0.202106021050-rc1Matthias Sohn2021-06-023-4/+4
| | | | | | | | | | Change-Id: I622ee049f14f37504ff4a062f03d6fc25465d0ec Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Prepare 5.12.0-SNAPSHOT buildsMatthias Sohn2021-06-023-4/+4
| | | | | | | | Change-Id: I25e4efc9b40ae4e7168b37385445c73992c5beb0
| * JGit v5.12.0.202106011439-rc1v5.12.0.202106011439-rc1Matthias Sohn2021-06-013-4/+4
| | | | | | | | | | Change-Id: Ieac1d02879defe0f4791062448d4efc328a2f652 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>