cat-file: make it work in a subdirectory.
authorJunio C Hamano <junkio@cox.net>
Tue, 30 Aug 2005 16:07:50 +0000 (09:07 -0700)
committerJunio C Hamano <junkio@cox.net>
Tue, 30 Aug 2005 20:56:21 +0000 (13:56 -0700)
Signed-off-by: Junio C Hamano <junkio@cox.net>
(cherry picked from 73244994ee4abd6e436e8a1d597dd917271d77a9 commit)

cat-file.c

index ef58970d82ae9d6e62ec43c496ac1677aedeee3f..d775a1545beb84caf05cae8980fb2d839240fdea 100644 (file)
@@ -12,6 +12,7 @@ int main(int argc, char **argv)
        void *buf;
        unsigned long size;
 
+       setup_git_directory();
        if (argc != 3 || get_sha1(argv[2], sha1))
                usage("git-cat-file [-t | -s | <type>] <sha1>");