]> asedeno.scripts.mit.edu Git - git.git/commitdiff
fast-import: exit with proper message if not a git dir
authorJean-Luc Herren <jlh@gmx.ch>
Thu, 28 Feb 2008 22:29:54 +0000 (23:29 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 3 Mar 2008 00:07:41 +0000 (16:07 -0800)
git fast-import expects to be run from an existing (possibly
empty) repository.  It was dying with a suboptimal message if that
wasn't the case.

Signed-off-by: Jean-Luc Herren <jlh@gmx.ch>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
fast-import.c

index 0d3449f2cef93ae0ece87f4204d5e817d6e62439..7f197d5e36ae977e21251dbb45fa72973ea7830f 100644 (file)
@@ -2377,6 +2377,7 @@ int main(int argc, const char **argv)
 {
        unsigned int i, show_stats = 1;
 
+       setup_git_directory();
        git_config(git_pack_config);
        if (!pack_compression_seen && core_compression_seen)
                pack_compression_level = core_compression_level;