sha1_name.c: clarify what "fake" is for in find_short_object_filename()
authorJunio C Hamano <gitster@pobox.com>
Mon, 18 Jun 2012 18:41:03 +0000 (11:41 -0700)
committerJunio 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

index e63459bd517fc8fea123b862bffbe82f89d07731..9bb657deb3dc3047a4a12713ff2717a7e60ab9b5 100644 (file)
@@ -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;