ktoso/maven-git-commit-id-plugin — pull request #80 by if6was9 (2013-11-16 00:30:30+00:00)
Title: allow git.branch to return accurate information from Jenkins/Hudson jobs

It is a known issue that git.branch is not populated with the actual branch when executed within Jenkins/Hudson.

This simple patch checks to see if the current execution is within Hudson or Jenkins, and falls back to the env var, GIT_BRANCH if it is set.

Since the Jenkins Git Plugin populates this environment variable, the "correct" value will be set.