Maven SCM
  1. Maven SCM
  2. SCM-584

Checkout branch with Git uses unfamiliar command sequence which leads to errors during checkout

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.4
    • Fix Version/s: 1.7
    • Component/s: maven-scm-provider-git
    • Labels:
      None
    • Complexity:
      Intermediate
    • Number of attachments :
      2

      Description

      I want to checkout a specific branch from my git repo using the maven-scm-plugin. The plugin first clones the repo and gets the default branch as selected in gitorious. After that the plugin executes git pull ... mybranch which works fine as long as there are no merge conflicts between current branch and branch to checkout. In the case of any conflict an error occurs.

      The git checkout -b command should be used instead.

      [INFO] Working directory: <a_dir>
      [INFO] Executing: /bin/sh -c cd /home/maven-proj/target/deploy-workspace && git fetch git://gitorious/<...>/my-proj.git
      [INFO] Working directory: <a_dir>
      [INFO] Executing: /bin/sh -c cd  /home/maven-proj/target/deploy-workspace && git checkout HEAD
      [INFO] Working directory: <a_dir>
      [INFO] Executing: /bin/sh -c cd /home/maven-proj/target/deploy-workspace && git ls-files
      [INFO] Working directory: <a_dir>
      [INFO] 
      [INFO] --- maven-scm-plugin:1.4:update (switch-branch) 
      [INFO] Executing: /bin/sh -c cd /home/maven-proj/target/deploy-workspace && git pull git://gitorious/<..>/deploy.git mysql55
      
      [WARNING] failed to update git, return code 1
      [ERROR] Provider message:
      [ERROR] The git-pull origin master command failed.
      [ERROR] Command output:
      [ERROR] From git://gitorious/<...>/deploy
       * branch            mysql55    -> FETCH_HEAD
      
      
      
      1. SCM-584.patch
        3 kB
        Sebastian Annies

        Activity

          People

          • Assignee:
            Olivier Lamy
            Reporter:
            Daniel Strassenburg
          • Votes:
            12 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: