t5512: stop losing git exit code in here-docs