Nathan Gray commented on Bug JENKINS-25580

It's your plugin and you can do whatever you want, but if there's somebody out there who's relying on a branch spec of "remoteName/bar/baz" to build "bar/baz" but match a randomly selected branch ending in "baz" for polling then they are seriously deranged. There is no rational use for this behavior. It's a good and noble thing to provide stability and compatibility for your users, but locking in senseless bugs is just pouring cement around your own feet.

If you really must keep this bizarre behavior (which is completely different from the way git branch names work in every other context outside your plugin) you really should do more to document it. The current documentation says this:

<remoteRepoName>/<branchName>
Tracks/checks out the specified branch. If ambiguous the first result is taken, which is not necessarily the expected one.
Better use refs/heads/<branchName>.
E.g. origin/master

This is only partially true. The branch I specified was unambiguous and worked fine for building but caused polling to fail. In fact, it takes the last "path" component of the branch and uses that, but only for polling it would appear. Good luck trying to explain that. Your best bet is probably to just display a bright red warning if the branch spec doesn't start with one of your "good" prefixes.

RE your question, the version that worked was a 1.x version. I'm not sure exactly which because we went through a few 2.x versions trying to debug this polling 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/d/optout.

Reply via email to