[ 
https://issues.apache.org/jira/browse/SCM-818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17963217#comment-17963217
 ] 

ASF GitHub Bot commented on SCM-818:
------------------------------------

jira-importer commented on issue #1041:
URL: https://github.com/apache/maven-scm/issues/1041#issuecomment-2964640640

   **[Michael 
Osipov](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=michael-o)**
 commented
   
   `HEAD` is the same as no arg, you would use `FETCH_HEAD` implicitly during 
pull, but still better than the behavior now. Update wouldn't work on a 
detached head w/o the master anyway.
   




> Updating doesn't work when in detached HEAD
> -------------------------------------------
>
>                 Key: SCM-818
>                 URL: https://issues.apache.org/jira/browse/SCM-818
>             Project: Maven SCM (Moved to GitHub Issues)
>          Issue Type: Bug
>          Components: maven-scm-provider-gitexe
>    Affects Versions: 1.9.4
>            Reporter: Alexandre Garnier
>            Assignee: Michael Osipov
>            Priority: Major
>             Fix For: 1.10.0
>
>
> When calling {{scm:update}} in detached HEAD:
> {code}
> [INFO] Executing: /bin/sh -c cd '/path/to/project' && 'git' 'log' '-n1' 
> '--date-order' 'master'
> [INFO] Working directory: /path/to/project
> [ERROR] Provider message:
> [ERROR] The git-log command failed.
> [ERROR] Command output:
> [ERROR] fatal: ambiguous argument 'master': unknown revision or path not in 
> the working tree.
> {code}
> When no {{ScmVersion}} is given, the plugin defaults to {{master}} 
> (https://github.com/apache/maven-scm/blob/master/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/main/java/org/apache/maven/scm/provider/git/gitexe/command/update/GitUpdateCommand.java#L169),
>  defaulting to {{HEAD}} would be better, no ?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to