summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sha1_file.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sha1_file.c b/sha1_file.c
index 6a5ba63..a3637d7 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -376,11 +376,12 @@ void prepare_alt_odb(void)
{
const char *alt;
+ if (alt_odb_tail)
+ return;
+
alt = getenv(ALTERNATE_DB_ENVIRONMENT);
if (!alt) alt = "";
- if (alt_odb_tail)
- return;
alt_odb_tail = &alt_odb_list;
link_alt_odb_entries(alt, alt + strlen(alt), ':', NULL, 0);