1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-01 19:26:10 +02:00

Merge branch 'jk/info-alternates-fix' into maint

We used to add an empty alternate object database to the system
that does not help anything; it has been corrected.

* jk/info-alternates-fix:
  link_alt_odb_entries: make empty input a noop
This commit is contained in:
Junio C Hamano 2017-11-21 14:05:31 +09:00
commit 5a80d1dd9c

View File

@ -404,6 +404,9 @@ static void link_alt_odb_entries(const char *alt, int sep,
struct strbuf objdirbuf = STRBUF_INIT;
struct strbuf entry = STRBUF_INIT;
if (!alt || !*alt)
return;
if (depth > 5) {
error("%s: ignoring alternate object stores, nesting too deep.",
relative_base);
@ -607,7 +610,6 @@ void prepare_alt_odb(void)
return;
alt = getenv(ALTERNATE_DB_ENVIRONMENT);
if (!alt) alt = "";
alt_odb_tail = &alt_odb_list;
link_alt_odb_entries(alt, PATH_SEP, NULL, 0);