git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Question - no space in smtp-server-option
@ 2018-09-17  1:02 Chris Coutinho
  2018-09-17  1:16 ` Jonathan Nieder
  0 siblings, 1 reply; 6+ messages in thread
From: Chris Coutinho @ 2018-09-17  1:02 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 643 bytes --]

Hello Git community,

To send a formatted git patch as an email using git I use `git 
send-email`. Using another email address than my default one requires 
the 'smtp-server-option' to be set, and currently this flag doesn't care 
much for spaces. Is this desired?

Currently my gitconfig contains the following line:

	sendemail.smtpserveroption=-a<myaccount>

Whereas, the following results in an 'account' not found error:

	sendemail.smtpserveroption=-a <myaccount>

Further, the full account flag (--account) is not recognized by 
`send-email`. Could someone expand a bit on the reasoning behind this?

Regards,
Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Question - no space in smtp-server-option
  2018-09-17  1:02 Question - no space in smtp-server-option Chris Coutinho
@ 2018-09-17  1:16 ` Jonathan Nieder
  2018-09-17  1:27   ` Chris Coutinho
  0 siblings, 1 reply; 6+ messages in thread
From: Jonathan Nieder @ 2018-09-17  1:16 UTC (permalink / raw)
  To: Chris Coutinho; +Cc: git

Hi,

Chris Coutinho wrote:

> Currently my gitconfig contains the following line:
>
> 	sendemail.smtpserveroption=-a<myaccount>
>
> Whereas, the following results in an 'account' not found error:
>
> 	sendemail.smtpserveroption=-a <myaccount>

Do you mean that your ~/.gitconfig literally contains that exact line?
I would be surprised to hear that syntax works --- see [1] for the
syntax I would expect to work.

If you have more details, that would help.

Thanks,
Jonathan

[1] https://www.kernel.org/pub/software/scm/git/docs/git-config.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Question - no space in smtp-server-option
  2018-09-17  1:16 ` Jonathan Nieder
@ 2018-09-17  1:27   ` Chris Coutinho
  2018-09-17  1:53     ` Jonathan Nieder
  0 siblings, 1 reply; 6+ messages in thread
From: Chris Coutinho @ 2018-09-17  1:27 UTC (permalink / raw)
  To: Jonathan Nieder; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 1000 bytes --]

On Sep-16-18, Jonathan Nieder wrote:
>Hi,
>
>Chris Coutinho wrote:
>
>> Currently my gitconfig contains the following line:
>>
>> 	sendemail.smtpserveroption=-a<myaccount>
>>
>> Whereas, the following results in an 'account' not found error:
>>
>> 	sendemail.smtpserveroption=-a <myaccount>
>
>Do you mean that your ~/.gitconfig literally contains that exact line?
>I would be surprised to hear that syntax works --- see [1] for the
>syntax I would expect to work.
>
>If you have more details, that would help.
>
>Thanks,
>Jonathan
>
>[1] https://www.kernel.org/pub/software/scm/git/docs/git-config.html

Yes that's the exact line in my gitconfig file, which correctly mails 
using the non-default account I'm after - I'm assuming you're noticing 
the lack of camelCase? To be honest, that came from zsh autosuggestions, 
which are all lower-case for some reason.

My question is just regarding the syntax of the smtp server option, 
namely about the (lack of a) space

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Question - no space in smtp-server-option
  2018-09-17  1:27   ` Chris Coutinho
@ 2018-09-17  1:53     ` Jonathan Nieder
  2018-09-17 11:23       ` Chris Coutinho
  2018-09-17 11:39       ` Chris Coutinho
  0 siblings, 2 replies; 6+ messages in thread
From: Jonathan Nieder @ 2018-09-17  1:53 UTC (permalink / raw)
  To: Chris Coutinho; +Cc: git

On Mon, Sep 17, 2018 at 03:27:21AM +0200, Chris Coutinho wrote:
> On Sep-16-18, Jonathan Nieder wrote:
>> Chris Coutinho wrote:

>>> Currently my gitconfig contains the following line:
>>>
>>> 	sendemail.smtpserveroption=-a<myaccount>
>>>
>>> Whereas, the following results in an 'account' not found error:
>>>
>>> 	sendemail.smtpserveroption=-a <myaccount>
>>
>> Do you mean that your ~/.gitconfig literally contains that exact line?
[...]
> Yes that's the exact line in my gitconfig file, which correctly mails using
> the non-default account I'm after - I'm assuming you're noticing the lack of
> camelCase? To be honest, that came from zsh autosuggestions, which are all
> lower-case for some reason.

No, case shouldn't matter.  I'm noticing the it looks like

	foo.bar=baz

instead of

	[foo]
		bar = baz

(i.e. it seems to be some syntax other than ini syntax).  E.g. I tried

	echo a.b=c >test.config
	git config -f test.config -l

and get

	fatal: bad config line 1 in file test.config

Thanks,
Jonathan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Question - no space in smtp-server-option
  2018-09-17  1:53     ` Jonathan Nieder
@ 2018-09-17 11:23       ` Chris Coutinho
  2018-09-17 11:39       ` Chris Coutinho
  1 sibling, 0 replies; 6+ messages in thread
From: Chris Coutinho @ 2018-09-17 11:23 UTC (permalink / raw)
  To: Jonathan Nieder; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 1408 bytes --]

On Sep-16-18, Jonathan Nieder wrote:
>On Mon, Sep 17, 2018 at 03:27:21AM +0200, Chris Coutinho wrote:
>> On Sep-16-18, Jonathan Nieder wrote:
>>> Chris Coutinho wrote:
>
>>>> Currently my gitconfig contains the following line:
>>>>
>>>> 	sendemail.smtpserveroption=-a<myaccount>
>>>>
>>>> Whereas, the following results in an 'account' not found error:
>>>>
>>>> 	sendemail.smtpserveroption=-a <myaccount>
>>>
>>> Do you mean that your ~/.gitconfig literally contains that exact line?
>[...]
>> Yes that's the exact line in my gitconfig file, which correctly mails using
>> the non-default account I'm after - I'm assuming you're noticing the lack of
>> camelCase? To be honest, that came from zsh autosuggestions, which are all
>> lower-case for some reason.
>
>No, case shouldn't matter.  I'm noticing the it looks like
>
>	foo.bar=baz
>
>instead of
>
>	[foo]
>		bar = baz
>
>(i.e. it seems to be some syntax other than ini syntax).  E.g. I tried
>
>	echo a.b=c >test.config
>	git config -f test.config -l
>
>and get
>
>	fatal: bad config line 1 in file test.config
>
>Thanks,
>Jonathan

Hi Jonathan,

Sorry for the inconsistency, you're write about the gitconfig syntax. I 
was actually printing out the config using `git config --local --list`.  
The actual config file has the two lines:

[sendemail]
	smtpserveroption = -a<myaccount>

Regards,
Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Question - no space in smtp-server-option
  2018-09-17  1:53     ` Jonathan Nieder
  2018-09-17 11:23       ` Chris Coutinho
@ 2018-09-17 11:39       ` Chris Coutinho
  1 sibling, 0 replies; 6+ messages in thread
From: Chris Coutinho @ 2018-09-17 11:39 UTC (permalink / raw)
  To: Jonathan Nieder; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 1423 bytes --]

On Sep-16-18, Jonathan Nieder wrote:
>On Mon, Sep 17, 2018 at 03:27:21AM +0200, Chris Coutinho wrote:
>> On Sep-16-18, Jonathan Nieder wrote:
>>> Chris Coutinho wrote:
>
>>>> Currently my gitconfig contains the following line:
>>>>
>>>> 	sendemail.smtpserveroption=-a<myaccount>
>>>>
>>>> Whereas, the following results in an 'account' not found error:
>>>>
>>>> 	sendemail.smtpserveroption=-a <myaccount>
>>>
>>> Do you mean that your ~/.gitconfig literally contains that exact line?
>[...]
>> Yes that's the exact line in my gitconfig file, which correctly mails using
>> the non-default account I'm after - I'm assuming you're noticing the lack of
>> camelCase? To be honest, that came from zsh autosuggestions, which are all
>> lower-case for some reason.
>
>No, case shouldn't matter.  I'm noticing the it looks like
>
>	foo.bar=baz
>
>instead of
>
>	[foo]
>		bar = baz
>
>(i.e. it seems to be some syntax other than ini syntax).  E.g. I tried
>
>	echo a.b=c >test.config
>	git config -f test.config -l
>
>and get
>
>	fatal: bad config line 1 in file test.config
>
>Thanks,
>Jonathan

I realized what my issue was when looking closer at the documentation - 
the smtp-server-option needs to be included as separate lines:

[sendemail]
	smtpserveroption = --account
	smtpserveroption = <myaccount>

I'm assuming this is intended behavior.

Thanks for your help,
Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-09-17 11:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-17  1:02 Question - no space in smtp-server-option Chris Coutinho
2018-09-17  1:16 ` Jonathan Nieder
2018-09-17  1:27   ` Chris Coutinho
2018-09-17  1:53     ` Jonathan Nieder
2018-09-17 11:23       ` Chris Coutinho
2018-09-17 11:39       ` Chris Coutinho

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).