Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hotfix-finish results in "ambiguous argument unknown revision or path not in the working tree" when done in a clean workspace #219

Closed
kaszuster opened this issue Feb 14, 2020 · 1 comment

Comments

@kaszuster
Copy link

Hi there,

i am using the maven gitflow plugin in conjunction with jenkins. One task is to open a support and a hotfix branch. At a late point in time a jenkins pipeline stage is used to finish the hotfix:

mvn -B -f pom.xml gitflow:hotfix-finish -DhotfixVersion=support/5.85.0/5.85.1-SNAPSHOT

This results in a [ERROR] Failed to execute goal com.amashchenko.maven.plugin:gitflow-maven-plugin:1.14.0:hotfix-finish (default-cli) on project myProject: hotfix-finish: fatal: mehrdeutiges Argument 'support/5.85.0...origin/support/5.85.0': unbekannter Commit oder Pfad existiert nicht

AKA ambiguous argument unknown revision or path not in the working tree

Here is why:

hotfix-finish wants to compare support/5.85.0...origin/support/5.85.0 but there is no locally checked out support/5.85.0

git branch -a
* hotfix/support/5.85.0/5.85.1-SNAPSHOT
  remotes/origin/develop
  remotes/origin/hotfix/support/5.84.0/5.84.1-SNAPSHOT
  remotes/origin/hotfix/support/5.85.0/5.85.1-SNAPSHOT
  remotes/origin/master
  remotes/origin/support/5.84.0
  remotes/origin/support/5.85.0

This happens because the workspace where the hotfix branch was created is not the same it is about to be closed, its a fresh one on an other jenkins node thats why the branch support/5.85.0 was never checked out. For now ill go with -DfetchRemote=false to skip the comparison of these branches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants