git-imap-send: Allow the program to be run from subdirectories of a git tree
authorRobert Shearman <robertshearman@gmail.com>
Wed, 9 Jul 2008 21:28:59 +0000 (22:28 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sat, 26 Jul 2008 04:51:29 +0000 (21:51 -0700)
Call setup_git_directory_gently to allow git-imap-send to be used from
subdirectories of a git tree.

Signed-off-by: Robert Shearman <robertshearman@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
imap-send.c

index 1ec131092109aa3fbed3cd20f10b56a864584a94..24d76a703161383c69d8984842908a988c54952e 100644 (file)
@@ -1292,10 +1292,12 @@ main(int argc, char **argv)
        int ofs = 0;
        int r;
        int total, n = 0;
+       int nongit_ok;
 
        /* init the random number generator */
        arc4_init();
 
+       setup_git_directory_gently(&nongit_ok);
        git_config(git_imap_config, NULL);
 
        if (!imap_folder) {