summaryrefslogtreecommitdiff
path: root/sha1_name.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-06-18 18:41:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-07-03 17:24:15 (GMT)
commit274ac009f4613a14d2114259e40c6b523d9b7160 (patch)
tree51d9a62bbe0e6269eb5473772334eaeb8a1242d0 /sha1_name.c
parent249c8f4a164c8502f8274c505a48b9c686f458d0 (diff)
downloadgit-274ac009f4613a14d2114259e40c6b523d9b7160.zip
git-274ac009f4613a14d2114259e40c6b523d9b7160.tar.gz
git-274ac009f4613a14d2114259e40c6b523d9b7160.tar.bz2
sha1_name.c: clarify what "fake" is for in find_short_object_filename()
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sha1_name.c')
-rw-r--r--sha1_name.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sha1_name.c b/sha1_name.c
index e63459b..9bb657d 100644
--- 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;