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

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

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

   **[Ancoron 
Luciferis](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=ancoron)**
 commented
   
   Patch availability for about 1,5 years and still not integrated... wow!
   
   But furthermore it is really strange why this issue appeared in the first 
place. The initial developer(s) of the git provider must have been blind. How 
else can you explain that someone wanted to do a 'git pull' for switching to a 
branch?! As every documentation says 'git pull' is just a shortcut for 'git 
fetch' + 'git merge'.
   
   From the man page:
   
   > [...] git pull runs git fetch with the given parameters and calls git 
merge to merge the retrieved branch heads into the current branch. [...]
   
   \\
   Even if it worked for the developer in the first place then only by luck.
   




> Checkout branch with Git uses unfamiliar command sequence which leads to 
> errors during checkout
> -----------------------------------------------------------------------------------------------
>
>                 Key: SCM-584
>                 URL: https://issues.apache.org/jira/browse/SCM-584
>             Project: Maven SCM (Moved to GitHub Issues)
>          Issue Type: Bug
>          Components: maven-scm-provider-gitexe
>    Affects Versions: 1.4
>            Reporter: Daniel Strassenburg
>            Assignee: Olivier Lamy
>            Priority: Critical
>             Fix For: 1.7
>
>         Attachments: SCM-584-test-prj.zip, SCM-584.patch
>
>
> 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.
> {noformat}
> [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
> {noformat}



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

Reply via email to