submodule-config: rename commit_sha1 to treeish_name
[gitweb.git] / git.c
diff --git a/git.c b/git.c
index be58788deb9ce0bca84138c882f4566c36b8e9fc..efa1059fe060e413336ed4a02ac01d9381b34323 100644 (file)
--- a/git.c
+++ b/git.c
@@ -35,8 +35,7 @@ static void save_env_before_alias(void)
        orig_cwd = xgetcwd();
        for (i = 0; i < ARRAY_SIZE(env_names); i++) {
                orig_env[i] = getenv(env_names[i]);
-               if (orig_env[i])
-                       orig_env[i] = xstrdup(orig_env[i]);
+               orig_env[i] = xstrdup_or_null(orig_env[i]);
        }
 }