Re: Why is GIT_BRANCH set twice in GitSCM.checkout

2016-02-22 Thread Mark Waite
I would set it in both places, and write tests to confirm it behaves as expected. Mark Waite On Monday, February 22, 2016 at 2:43:17 PM UTC-7, Michael Giroux wrote: > > I'm looking to add a new environment variable to expose the LocalBranch > name as GIT_LOCAL_BRANCH. I'm looking at the code i

Re: Why is GIT_BRANCH set twice in GitSCM.checkout

2016-02-22 Thread Michael Giroux
I added a few log messages to track the progress of a build and discovered that buildEnvVars is called several times. I doubt this hurts anything, but it seems this could be optimized some. Feb 22, 2016 2:56:26 PM hudson.plugins.git.GitSCM buildEnvVars INFO: ENTER Feb 22, 2016 2:56:26 PM huds

Why is GIT_BRANCH set twice in GitSCM.checkout

2016-02-22 Thread Michael Giroux
I'm looking to add a new environment variable to expose the LocalBranch name as GIT_LOCAL_BRANCH. I'm looking at the code in GitSCM.checkout and am not able to figure out why GIT_BRANCH is being set twice. GIT_BRANCH is set first when checkout sets environment: EnvVars environment = bu