Description
cargo new
also initializes git. Awesome! Git is configurable through environment variables. Awesome! So why does git, when invoked by cargo, suddenly stop listening to its environment?
Steps to reproduce / I tried this:
$ mkdir empty_reference_dir
$ export GIT_TEMPLATE_DIR=$(realpath empty_reference_dir)
$ cargo new newproject
Expected behavior / I expected to see this happen:
Absence of files/dirs .git/description
, .git/hooks/
, and .git/info/
.
Or more generally: I expected the absence of the files usually found in /usr/share/git-core/templates
Actual behavior / Instead, this happened:
It seems like all files from /usr/share/git-core/templates
were copied.
My best guess: Either cargo crafts its own "clean" environment (why should it?), or cargo's emulation of git is incomplete.
For reference: A simple git init
works as I desire, i.e., it obeys GIT_TEMPLATE_DIR
. So at least I'm sure I didn't have a brainfart there.
Activity