Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
sha1_name.c: clarify what "fake" is for in find_short_object_filename()
author
Junio C Hamano
<gitster@pobox.com>
Mon, 18 Jun 2012 18:41:03 +0000
(11:41 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 3 Jul 2012 17:24:15 +0000
(10:24 -0700)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sha1_name.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
249c8f4
)
diff --git
a/sha1_name.c
b/sha1_name.c
index e63459bd517fc8fea123b862bffbe82f89d07731..9bb657deb3dc3047a4a12713ff2717a7e60ab9b5 100644
(file)
--- a/
sha1_name.c
+++ b/
sha1_name.c
@@
-17,6
+17,13
@@
static int find_short_object_filename(int len, const char *name, unsigned char *
static struct alternate_object_database *fakeent;
if (!fakeent) {
+ /*
+ * Create a "fake" alternate object database that
+ * points to our own object database, to make it
+ * easier to get a temporary working space in
+ * alt->name/alt->base while iterating over the
+ * object databases including our own.
+ */
const char *objdir = get_object_directory();
int objdir_len = strlen(objdir);
int entlen = objdir_len + 43;