Commit 9f09f290bbe49865f57cadb68883af0cd3b2cb71

Carlos Martín Nieto 2016-12-17T18:20:29

sysdir: don't guess the paths again when $PATH is specified We should replace it with whatever the user set, not start again.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/sysdir.c b/src/sysdir.c
index 29e53e2..e89db76 100644
--- a/src/sysdir.c
+++ b/src/sysdir.c
@@ -171,7 +171,7 @@ int git_sysdir_set(git_sysdir_t which, const char *search_path)
 		expand_path = strstr(search_path, PATH_MAGIC);
 
 	/* reset the default if this path has been cleared */
-	if (!search_path || expand_path)
+	if (!search_path)
 		git_sysdir__dirs[which].guess(&git_sysdir__dirs[which].buf);
 
 	/* if $PATH is not referenced, then just set the path */