git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How to force explicit user info
@ 2008-03-05 13:39 Santi Béjar
  2008-03-05 14:38 ` Jakub Narebski
  2008-03-05 14:45 ` Daniel Barkalow
  0 siblings, 2 replies; 5+ messages in thread
From: Santi Béjar @ 2008-03-05 13:39 UTC (permalink / raw)
  To: Git Mailing List

Hi  *,


  how can I forbid the gecos info and always force git to ask for an
explicit user.name and user.email?

  I use a different email for personal projects and for work projects,
using the same machine. So I set user.email locally in each
repository. But when I forget setting this I get
userid@hostname.(none) as the email. Is there a way to just die and
ask for this info (maybe user.AlwaysExplicit or something like that)?

  Thanks

  Santi

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

* Re: How to force explicit user info
  2008-03-05 13:39 How to force explicit user info Santi Béjar
@ 2008-03-05 14:38 ` Jakub Narebski
  2008-03-05 14:46   ` Santi Béjar
  2008-03-05 14:45 ` Daniel Barkalow
  1 sibling, 1 reply; 5+ messages in thread
From: Jakub Narebski @ 2008-03-05 14:38 UTC (permalink / raw)
  To: Santi Béjar; +Cc: Git Mailing List

"Santi Béjar" <sbejar@gmail.com> writes:

>   How can I forbid the gecos info and always force git to ask for an
> explicit user.name and user.email?
> 
>   I use a different email for personal projects and for work projects,
> using the same machine. So I set user.email locally in each
> repository. But when I forget setting this I get
> userid@hostname.(none) as the email. Is there a way to just die and
> ask for this info (maybe user.AlwaysExplicit or something like that)?

I don't think there is a way to get exactly what you want... unless
you would "scratch that itch"... :-)

You can set default user.name and user.email in the ~/.gitconfig
global (user) git configuration, and in /etc/gitconfig for system-wide
git config, though. HTH.

-- 
Jakub Narebski
Poland
ShadeHawk on #git

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

* Re: How to force explicit user info
  2008-03-05 13:39 How to force explicit user info Santi Béjar
  2008-03-05 14:38 ` Jakub Narebski
@ 2008-03-05 14:45 ` Daniel Barkalow
  2008-03-05 14:48   ` Santi Béjar
  1 sibling, 1 reply; 5+ messages in thread
From: Daniel Barkalow @ 2008-03-05 14:45 UTC (permalink / raw)
  To: Santi Béjar; +Cc: Git Mailing List

[-- Attachment #1: Type: TEXT/PLAIN, Size: 646 bytes --]

On Wed, 5 Mar 2008, Santi Béjar wrote:

> Hi  *,
> 
> 
>   how can I forbid the gecos info and always force git to ask for an
> explicit user.name and user.email?
> 
>   I use a different email for personal projects and for work projects,
> using the same machine. So I set user.email locally in each
> repository. But when I forget setting this I get
> userid@hostname.(none) as the email. Is there a way to just die and
> ask for this info (maybe user.AlwaysExplicit or something like that)?

It doesn't work now, but I think a global:

[user]
	name

Could usefully be made to disable the default.

	-Daniel
*This .sig left intentionally blank*

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

* Re: How to force explicit user info
  2008-03-05 14:38 ` Jakub Narebski
@ 2008-03-05 14:46   ` Santi Béjar
  0 siblings, 0 replies; 5+ messages in thread
From: Santi Béjar @ 2008-03-05 14:46 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: Git Mailing List

On Wed, Mar 5, 2008 at 3:38 PM, Jakub Narebski <jnareb@gmail.com> wrote:
>
> "Santi Béjar" <sbejar@gmail.com> writes:
>
>  >   How can I forbid the gecos info and always force git to ask for an
>  > explicit user.name and user.email?
>  >
>  >   I use a different email for personal projects and for work projects,
>  > using the same machine. So I set user.email locally in each
>  > repository. But when I forget setting this I get
>  > userid@hostname.(none) as the email. Is there a way to just die and
>  > ask for this info (maybe user.AlwaysExplicit or something like that)?
>
>  I don't think there is a way to get exactly what you want... unless
>  you would "scratch that itch"... :-)

Yes, I'll add this to my todo.

>
>  You can set default user.name and user.email in the ~/.gitconfig
>  global (user) git configuration, and in /etc/gitconfig for system-wide
>  git config, though. HTH.

But I don't want a default user.{name,email}.

Santi




>
>  --
>  Jakub Narebski
>  Poland
>  ShadeHawk on #git
>

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

* Re: How to force explicit user info
  2008-03-05 14:45 ` Daniel Barkalow
@ 2008-03-05 14:48   ` Santi Béjar
  0 siblings, 0 replies; 5+ messages in thread
From: Santi Béjar @ 2008-03-05 14:48 UTC (permalink / raw)
  To: Daniel Barkalow; +Cc: Git Mailing List

On Wed, Mar 5, 2008 at 3:45 PM, Daniel Barkalow <barkalow@iabervon.org> wrote:
>
> On Wed, 5 Mar 2008, Santi Béjar wrote:
>
>  > Hi  *,
>  >
>  >
>  >   how can I forbid the gecos info and always force git to ask for an
>  > explicit user.name and user.email?
>  >
>  >   I use a different email for personal projects and for work projects,
>  > using the same machine. So I set user.email locally in each
>  > repository. But when I forget setting this I get
>  > userid@hostname.(none) as the email. Is there a way to just die and
>  > ask for this info (maybe user.AlwaysExplicit or something like that)?
>
>  It doesn't work now, but I think a global:
>
>  [user]
>         name
>
>  Could usefully be made to disable the default.
>

Yes, in fact I tried it. I think it makes sense as a way to disable
the default name, instead of another config option.

Santi

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

end of thread, other threads:[~2008-03-05 14:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-05 13:39 How to force explicit user info Santi Béjar
2008-03-05 14:38 ` Jakub Narebski
2008-03-05 14:46   ` Santi Béjar
2008-03-05 14:45 ` Daniel Barkalow
2008-03-05 14:48   ` Santi Béjar

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 NNTP newsgroup(s).