[
https://issues.apache.org/jira/browse/SCM-885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16481124#comment-16481124
]
ASF GitHub Bot commented on SCM-885:
------------------------------------
michael-o commented on a change in pull request #74: [SCM-885] third
implementation
URL: https://github.com/apache/maven-scm/pull/74#discussion_r189379912
##########
File path:
maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/AbstractChangeLogCommand.java
##########
@@ -76,13 +84,21 @@ public ScmResult executeCommand( ScmProviderRepository
repository, ScmFileSet fi
ScmBranch branch = (ScmBranch) parameters.getScmVersion(
CommandParameter.BRANCH, null );
+ ScmVersion version = parameters.getScmVersion(
CommandParameter.SCM_VERSION, null );
+
ScmVersion startVersion = parameters.getScmVersion(
CommandParameter.START_SCM_VERSION, null );
ScmVersion endVersion = parameters.getScmVersion(
CommandParameter.END_SCM_VERSION, null );
String datePattern = parameters.getString(
CommandParameter.CHANGELOG_DATE_PATTERN, null );
- if ( startVersion != null || endVersion != null )
+ boolean fromVersionToStartOfRepository = startVersion == null &&
endVersion == null && version != null;
Review comment:
The variable name is a bit confusing because we have `startVersion` and the
name contains `start` too.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> GitChangeLogCommand is wrong when only endVersion is set
> --------------------------------------------------------
>
> Key: SCM-885
> URL: https://issues.apache.org/jira/browse/SCM-885
> Project: Maven SCM
> Issue Type: Bug
> Components: maven-scm-provider-gitexe
> Affects Versions: 1.9.5
> Reporter: Matthieu Brouillard
> Assignee: Michael Osipov
> Priority: Major
> Fix For: 1.9.6
>
> Attachments: scm-885-different-behavior-exe-jgit-patch.diff
>
>
> Invoking execution of a GitChangeLogCommand where only the end revision has
> been set produces a wrong out.
> +Actual result:+
> {{git whatchanged --date=iso ..END_REVISION_SHA1 -- PROJECT_PATH}}
> +Expected result:+ only the end revison SHA1 is used without the two dots
> {{git whatchanged --date=iso END_REVISION_SHA1 -- PROJECT_PATH}}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)