When git plugin branch is configured for tracking multiple branches (like '*' or 'origin/prefix.'), it looks like it ignores branches referring to the same SHA1 as another already built branch.
For example, if master branch is already built, then none of the following commands will trigger a build:
git branch release master
git branch prevrelease master~20
git checkout prevrelease; git reset --hard master~10
This behaviour prevents me from creating jobs that for example:
- use "Conditional Trigger" plugin to spawn another job when new branch is created (or updated);
- or mirror the repository to another location.
On the other hand, the current behaviour (of ignoring already built SHA1 regardless of the branch on which it was built) is sensible and probably suitable for most users.
So I think it would be nice if git plugin had some configuration option that would consider both SHA1 and the branch name to decide if build is needed. I guess it should be a quite simple check to implement: if previous SHA1 of a branch does not exist or it is different than current SHA1 of the branch, then spawn a build.
Would it be possible to add such an option?
Thank you in advance,