Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'jk/info-alternates-fix' into maint
author
Junio C Hamano
<gitster@pobox.com>
Tue, 21 Nov 2017 05:05:31 +0000
(14:05 +0900)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 21 Nov 2017 05:05:31 +0000
(14:05 +0900)
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
sha1_file.c
patch
|
blob
|
history
raw
(from parent 1:
8e3e51a
)
diff --git
a/sha1_file.c
b/sha1_file.c
index 10c3a0083dedee98dc3d48267ad349589adef3f0..36f85455e6748efb7c2d593c7a619fa13150600b 100644
(file)
--- a/
sha1_file.c
+++ b/
sha1_file.c
@@
-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);