tests: re-use with_environment in using_git_env
tests: re-use with_environment in using_git_env

Proposed by @reitermarkus in
https://github.com/Homebrew/brew/pull/1890#discussion_r97210285.

I made one slight adjustment of preserving the previous date string in
case anything was relying on it.

claui/brew,reitermarkus/brew,amar-laksh/brew_sudo,nandub/brew,sjackman/homebrew,zmwangx/brew,alyssais/brew,sjackman/homebrew,alyssais/brew,reitermarkus/brew,gregory-nisbet/brew,DomT4/brew,gregory-nisbet/brew,maxim-belkin/brew,JCount/brew,mahori/brew,Homebrew/brew,maxim-belkin/brew,hanxue/linuxbrew,pseudocody/brew,zmwangx/brew,reitermarkus/brew,EricFromCanada/brew,maxim-belkin/brew,nandub/brew,rwhogg/brew,hanxue/linuxbrew,palxex/brew,Homebrew/brew,zmwangx/brew,claui/brew,MikeMcQuaid/brew,konqui/brew,alyssais/brew,ilovezfs/brew,claui/brew,reelsense/brew,jmsundar/brew,JCount/brew,sjackman/homebrew,mgrimes/brew,palxex/brew,tonyg/homebrew,DomT4/brew,tonyg/homebrew,bfontaine/brew,bfontaine/brew,EricFromCanada/brew,tonyg/homebrew,konqui/brew,vitorgalvao/brew,JCount/brew,mahori/brew,pseudocody/brew,muellermartin/dist,MikeMcQuaid/brew,amar-laksh/brew_sudo,Homebrew/brew,aw1621107/brew,reelsense/brew,claui/brew,jmsundar/brew,konqui/brew,hanxue/linuxbrew,sjackman/homebrew,JCount/brew,konqui/brew,aw1621107/brew,rwhogg/brew,MikeMcQuaid/brew,ilovezfs/brew,DomT4/brew,EricFromCanada/brew,reitermarkus/brew,Linuxbrew/brew,MikeMcQuaid/brew,palxex/brew,pseudocody/brew,Linuxbrew/brew,rwhogg/brew,Linuxbrew/brew,vitorgalvao/brew,muellermartin/dist,vitorgalvao/brew,mgrimes/brew,mahori/brew,mgrimes/brew,EricFromCanada/brew,mahori/brew,ilovezfs/brew,amar-laksh/brew_sudo,nandub/brew,muellermartin/dist,aw1621107/brew,Linuxbrew/brew,jmsundar/brew,bfontaine/brew,vitorgalvao/brew,Homebrew/brew,gregory-nisbet/brew,nandub/brew,DomT4/brew,reelsense/brew