arturobernalg opened a new pull request, #1431: URL: https://github.com/apache/maven-scm/pull/1431
GitDiffCommand.executeDiffCommand() always ran a second "git diff --cached" after the plain diff, passing it both the start and end revision when both were given. git diff --cached accepts at most one revision, so the command failed with a usage error, breaking any diff between two fixed revisions (e.g. scm:diff -DstartScmVersion=... -DendScmVersion=...). When both revisions are given, the plain diff already compares the two full trees and the index has no part to play in it, so skip the cached diff in that case instead of passing git an invalid two-revision --cached invocation. --- To make clear that you license your contribution under the Apache License Version 2.0, January 2004, check one of the following: - [x] I hereby declare this contribution to be licensed under the Apache License Version 2.0, January 2004 - [x] I hereby declare that I have filed an Apache Individual Contributor License Agreement https://claude.ai/code/session_0153qyh22xBMN1vPfWGz3jSH -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
