Uploaded image for project: 'Maven SCM'
  1. Maven SCM
  2. SCM-818

Updating doesn't work when in detached HEAD

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.9.4
    • 1.10.0
    • None

    Description

      When calling scm:update in detached HEAD:

      [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.
      

      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 ?

      Attachments

        Issue Links

          Activity

            People

              michael-o Michael Osipov
              zigarn Alexandre Garnier
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: