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

Updating doesn't work when in detached HEAD

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.4
    • Fix Version/s: 1.10.0
    • Labels:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: