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

4 messages from 2008-06-01 to 2008-06-02. Participants: Rob Shearman, Miklos Vajna.
Thread: https://gitlist.dev/t/13753

## Rob Shearman, 2008-06-01 15:28

Subject: [PATCH] git-imap-send: Allow the program to be run from subdirectories of a git tree.
Message-ID: <1096648c0806010828yf4f07ebt3f758f41cab5cdfd@mail.gmail.com>
URL: https://gitlist.dev/e/1096648c0806010828yf4f07ebt3f758f41cab5cdfd%40mail.gmail.com

```
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(-)


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, 2008-06-01 22:04

Subject: Re: [PATCH] git-imap-send: Allow the program to be run from subdirectories of a git tree.
Message-ID: <20080601220410.GD29404@genesis.frugalware.org>
URL: https://gitlist.dev/e/20080601220410.GD29404%40genesis.frugalware.org
In-Reply-To: <1096648c0806010828yf4f07ebt3f758f41cab5cdfd@mail.gmail.com>

```
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, 2008-06-02 08:18

Subject: Re: [PATCH] git-imap-send: Allow the program to be run from subdirectories of a git tree.
Message-ID: <1096648c0806020118i1d990affn17af29651e60b13b@mail.gmail.com>
URL: https://gitlist.dev/e/1096648c0806020118i1d990affn17af29651e60b13b%40mail.gmail.com
In-Reply-To: <20080601220410.GD29404@genesis.frugalware.org>

```
2008/6/1 Miklos Vajna <vmiklos@frugalware.org>:
> 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, 2008-06-02 13:21

Subject: Re: [PATCH] git-imap-send: Allow the program to be run from subdirectories of a git tree.
Message-ID: <20080602132138.GG29404@genesis.frugalware.org>
URL: https://gitlist.dev/e/20080602132138.GG29404%40genesis.frugalware.org
In-Reply-To: <1096648c0806020118i1d990affn17af29651e60b13b@mail.gmail.com>

```
On Mon, Jun 02, 2008 at 09:18:09AM +0100, Rob Shearman <robertshearman@gmail.com> wrote:
> > 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.

```
