git.c: two fixes, gitsetenv type and off-by-one error.