The git plugin for hudson works well. However, the build script must update a version number in the files in the repository, commit, and push back to the repository.
When Hudson polls next to check for changes, it goes into an infinite loop because it sees that commit as a "change" builds again, which commits a change, so it builds again, then it commits another change, etc... You get the idea.
I stopped it, ran a "git log" in each repository and compared the latest commit ids are exactly the same using git ls-tree HEAD
Also, Hudson runs this command to check for changes:
git fetch +refs/heads/:refs/remotes/origin/ git ls-tree HEAD
Since Hudson itself pushed the commit from its workspace repository, and apparently the ls-tree results match, how can this command determine that there as been a change?
It seems that it must be storing the results of ls-tree prior to doing the build and comparing to that which won't have the latest commit. Ah. I can try turning off the commit to test that theory.
Anyway, rather than fix any issue in the git plugin for Hudson, what can I do to make sure at the end of my build that the repos are identical and that Hudson will see it so.
How to fix this? Any ideas?
Wayne