gc.sh: use --git-dir= instead of GIT_DIR=
commit44c2449bef3d965ad1a093b75916f55115e4875a
authorKyle J. McKay <mackyle@gmail.com>
Sun, 14 Aug 2016 03:45:19 +0000 (13 20:45 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Sun, 14 Aug 2016 03:45:19 +0000 (13 20:45 -0700)
tree8e30d40249a64bd16465feed5b094a14e6f48a3a
parent41ee6c7df1bb1c332710b2f8a56db51fdc425d7f
gc.sh: use --git-dir= instead of GIT_DIR=

Using GIT_DIR= has an unfortunate interaction with the git() wrapper
in shlib.sh that can leave GIT_DIR set when it was supposed to be
set only temporarily.

Therefore switch from using GIT_DIR= to --git-dir= instead to avoid
this problem.

Fortunately in this case there were no ill effects because thanks to
the "get_repo_list | while read" pipe the problematic GIT_DIR= was
running in a subshell and could not adversely affect any other code.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
jobd/gc.sh