5

In jenkins pipeline, execute git command :

git log --format=%B --no-merges origin/master..origin/${currentBranch}

jenkins output error :

fatal: ambiguous argument 'origin/master..origin/XOPS-42_AddResultToJIRA': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

but in my local computer i execute above git command, it work well, how to resolve above error in jenkins

1
  • Does branch XOPS-42_AddResultToJIRA exist? How is currentBranch set? – papanito Apr 21 '20 at 6:25
1

From the git documentation around the command git rev-list:

git rev-list A...B

Try your command syntax like the above (i.e. origin/master...origin/${currentBranch})

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.