Change By: Torsten Beuck (20/Feb/13 2:50 PM)
Environment: Jenkins ver. 1.480.3, Git Plugin 1.1.29
Description: When configuring a Jenkins job with "merge before build" and setting "Branch to merge to" to develop, the job fails with an "IllegalArgumentException: Invalid id".

In the class hudson.plugins.git.GitSCM the method computeMergeChangeLog is called with the remote branch name as third paramater (called revFrom in the method declaration). In the method computeMergeChangeLog the following code is executed:

if (!git.isCommitInRepo(ObjectId.fromString(revFrom))) {
  ...
}

If revFrom is the remote branch name (e.g. "origin/develop"), the fromString method of the JGit class ObjectId throws the IllegalArgumentException because "origin/develop" does not have a length of 40.
ObjectId.fromString obviously expects a Git commit ID - which has a length of 40 characters - and not the name of a branch ref.

The bug was introduced with 1.1.27. Installing 1.1.26 fixed the problem.
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply via email to