+
+ /* Do not look in /etc/ for gitconfig and gitattributes. */
+ setenv("GIT_CONFIG_NOSYSTEM", "1", 1);
+ setenv("GIT_ATTR_NOSYSTEM", "1", 1);
+
+ /* We unset HOME and XDG_CONFIG_HOME before calling the git setup function
+ * so that we don't make unneccessary filesystem accesses. */
+ user_home = getenv("HOME");
+ xdg_home = getenv("XDG_CONFIG_HOME");
+ unsetenv("HOME");
+ unsetenv("XDG_CONFIG_HOME");
+
+ /* Setup the git directory and initialize the notes system. Both of these
+ * load local configuration from the git repository, so we do them both while
+ * the HOME variables are unset. */