{"thread":{"id":"14322","subject":"[PATCH 1/3] git-imap-send: Allow the program to be run from subdirectories of a git tree.","startedAt":"2008-07-07T08:05:22Z","lastAt":"2008-07-08T04:10:37Z","messageCount":2,"participants":["Rob Shearman","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"82431","messageId":"1096648c0807070105l49a6dc38ra1710b0aadb220d9@mail.gmail.com","threadId":"14322","inReplyTo":null,"subject":"[PATCH 1/3] git-imap-send: Allow the program to be run from subdirectories of a git tree.","fromName":"Rob Shearman","fromEmail":"robertshearman@gmail.com","sentAt":"2008-07-07T08:05:22Z","receivedAt":"2008-07-07T08:05:22Z","isPatch":true,"sender":{"key":"robertshearman@gmail.com","avatar":null},"body":"Call setup_git_directory_gently to allow git-imap-send to be used from\nsubdirectories of a git tree.\n---\n imap-send.c |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/imap-send.c b/imap-send.c\nindex 1ec1310..89a1532 100644\n--- a/imap-send.c\n+++ b/imap-send.c\n@@ -1296,6 +1296,7 @@ main(int argc, char **argv)\n \t/* init the random number generator */\n \tarc4_init();\n\n+\tsetup_git_directory_gently( NULL );\n \tgit_config(git_imap_config, NULL);\n\n \tif (!imap_folder) {\n-- \n1.5.6.GIT\n"},{"id":"82539","messageId":"20080708041037.GB7186@sigill.intra.peff.net","threadId":"14322","inReplyTo":"1096648c0807070105l49a6dc38ra1710b0aadb220d9@mail.gmail.com","subject":"Re: [PATCH 1/3] git-imap-send: Allow the program to be run from subdirectories of a git tree.","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-07-08T04:10:37Z","receivedAt":"2008-07-08T04:10:37Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Jul 07, 2008 at 09:05:22AM +0100, Rob Shearman wrote:\n\n> Call setup_git_directory_gently to allow git-imap-send to be used from\n> subdirectories of a git tree.\n> [...]\n> +\tsetup_git_directory_gently( NULL );\n\nI don't think this is right; now we _must_ be in a git tree to run the\ncommand, which was not the case previously. You need to pass a non-NULL\nparameter to setup_git_directory_gently, which is where it will store\nthe \"are we in a git dir\" return value (even if you don't want to look\nat it, if the parameter is NULL, it will die(\"not a git repository\")).\n\n-Peff\n"}]}