Partially revert "Consider /srv/dev-images to be a safe.directory"
Passing -c safe.directory=<dir>
doesn't work. This is confirmed in
the "git config" docs:
This config setting is only respected when specified in a system
or global config, not when it is specified in a repository config
or via the command line option -c safe.directory=<path>.
So, remove the -c safe.directory=$git_dir but retain the small refactoring that was done in 45d09f1c.
Change-Id: I076068cba79f6280337d57f18e10e5507fbbcf37