threads / patch / 13753

patchgit-imap-send: Allow the program to be run from subdirectories of a git tree.

Subject: [PATCH] git-imap-send: Allow the program to be run from subdirectories of a git tree.

## tl;dr

4 messages between Jun 1, 2008 and Jun 2, 2008. Diffs are folded; open one to read it.

replies: 3people: 2as markdown or json

Rob Shearman· Jun 1, 2008, 15:28 UTC · lore

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>
---
 imap-send.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Show changes to imap-send.c +1 −0
diff --git a/imap-send.c b/imap-send.c
index 1ec1310..89a1532 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -1296,6 +1296,7 @@ main(int argc, char **argv)
 	/* init the random number generator */
 	arc4_init();
 
+	setup_git_directory_gently( NULL );
 	git_config(git_imap_config, NULL);
 
 	if (!imap_folder) {
Miklos Vajna· Jun 1, 2008, 22:04 UTC · re: Rob Shearman · lore

Re: [PATCH] git-imap-send: Allow the program to be run from subdirectories of a git tree.

On Sun, Jun 01, 2008 at 04:28:44PM +0100, Rob Shearman <robertshearman@gmail.com> wrote:
> +	setup_git_directory_gently( NULL );
>  	git_config(git_imap_config, NULL);

I know this is just about cosmetics, but the style of the rest of the code would suggest using

        setup_git_directory_gently(NULL);
not 
        setup_git_directory_gently( NULL );
Rob Shearman· Jun 2, 2008, 08:18 UTC · re: Miklos Vajna · lore

Re: [PATCH] git-imap-send: Allow the program to be run from subdirectories of a git tree.

2008/6/1 Miklos Vajna <vmiklos@frugalware.org>:
Show 12 quoted lines
> On Sun, Jun 01, 2008 at 04:28:44PM +0100, Rob Shearman <robertshearman@gmail.com> wrote:
>> +     setup_git_directory_gently( NULL );
>>       git_config(git_imap_config, NULL);
>
> I know this is just about cosmetics, but the style of the rest of the
> code would suggest using
>
>        setup_git_directory_gently(NULL);
>
> not
>
>        setup_git_directory_gently( NULL );

This isn't my normal coding style - I was trying to match the coding style to the rest of the file. Only the subsequent line to my added line uses the "func(arg)" style instead of the "func( arg )" style and that line was changed to the former very recently.

A patch to fix the style of the call to git_config could be done separately to this one.

-- 
Rob Shearman
Miklos Vajna· Jun 2, 2008, 13:21 UTC · re: Rob Shearman · lore

Re: [PATCH] git-imap-send: Allow the program to be run from subdirectories of a git tree.

On Mon, Jun 02, 2008 at 09:18:09AM +0100, Rob Shearman <robertshearman@gmail.com> wrote:
Show 8 quoted lines
> > not
> >
> >        setup_git_directory_gently( NULL );
> 
> This isn't my normal coding style - I was trying to match the coding
> style to the rest of the file. Only the subsequent line to my added
> line uses the "func(arg)" style instead of the "func( arg )" style and
> that line was changed to the former very recently.

Ah, I see. I haven't looked at imap-send.c specifically, it seems that this weird "func( arg )" style is used there a lot of times, so sorry for bothering you with cosmetics.

← back to recent threads