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

git rev-parse stderr when merging a PR with squash option + delete source branch on bitbucket. #285

Open
ericfaure007 opened this issue Oct 13, 2022 · 0 comments

Comments

@ericfaure007
Copy link

I have a problem on a specific case:

Jenkins 2.346.3
BBPPR 2.8.3
bitbucket server v7.21.4

When merging a bitbucket PR with squash merge strategy + deleting the source branch, the jenkins job is triggered as it should but the git plugin is failing to checkout/rev-parse with the following error message:

git rev-parse xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx^{commit} # timeout=10
FATAL: Command "git rev-parse xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx^{commit}" returned status code 128:
stdout: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx^{commit}

stderr: fatal: ambiguous argument 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx^{commit}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:

First analysis:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx is the last source branch commitID of the PR.
git plugin is using it, but is failing because the commitID doesn't exist anymore.
Indeed it's because the source branch is deleted (so the commitID too) and destination branch is squashed so it doesn't contain this commitID neither.

I have tried to configure/setup SCM to change the behavior of using the latest source branch commitID, but I didn't succeed.
Is there a way to change that? Is there another workaround?
Is BBPPR supporting squash merge strategy?

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

1 participant