From: "Santi Béjar" <sbejar@gmail.com>
To: "Junio C Hamano" <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] user.default: New config to prevent using the default values for user.*
Date: Thu, 6 Mar 2008 09:08:09 +0100 [thread overview]
Message-ID: <8aa486160803060008g4dc3cb8cg6bfce8d2f88461d3@mail.gmail.com> (raw)
In-Reply-To: <7v3ar4itk9.fsf@gitster.siamese.dyndns.org>
On Thu, Mar 6, 2008 at 1:29 AM, Junio C Hamano <gitster@pobox.com> wrote:
>
> "Santi Béjar" <sbejar@gmail.com> writes:
>
> > On Thu, Mar 6, 2008 at 12:29 AM, Junio C Hamano <gitster@pobox.com> wrote:
> >> "Santi Béjar" <sbejar@gmail.com> writes:
> >>
> >> >> > I would still need something to prevent doing a commit without a
> >> >> > locally specified name/email.
> >> >>
> >> >> Yes, but that something could simply be "echo '[user] name'
> >> >> >.git/config" in that hook, for example.
> >> >
> >> > But I want a different locally specified name in each repository,
> >> > because I use different emails for different projects
> >> > (private/work/...).
> >>
> >> You changed your mind then? You said you wanted to have something that
> >> prevents a commit from being made immediately after git-init before
> >> per-repo user.name is properly configured. Doesn't that echo achieve that
> >> goal?
> >
> > But that was in the context of the initial patch where I said that I
> > wanted different name/emails in each repository.
> >
> > To summarize, the problem is that I work in different projects
> > (private/work/git/...) using the same account, but I want different
> > identifies (name/email) in each. So I set user.name and user.email in
> > each repository, but when I forget to set them git uses the default
> > ones (userid@hostname.(none)).
> >
> > Hope I have explained it well.
>
> Try:
>
> $ mkdir -p /var/tmp/junk && cd /var/tmp/junk
> $ git init
>
> $ echo '[user] name' >>.git/config
> $ >foo
> $ git add
>
> and tell me what you see.
Every single command fails because it no longer a valid git repository.
>
> That's why I gave you the example of setting "[user] name"
> (notice I did not say [user] name = 'Santi's name for this project')
> to force you to configure it to whatever you want.
But then I have to configure in all the repositories, even the ones I
do not develop.
Santi
prev parent reply other threads:[~2008-03-06 8:09 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-05 19:18 [PATCH] user.default: New config to prevent using the default values for user.* Santi Béjar
2008-03-05 19:54 ` Jon Loeliger
2008-03-05 20:36 ` Santi Béjar
2008-03-05 20:11 ` Johannes Schindelin
2008-03-05 20:21 ` Daniel Barkalow
2008-03-05 20:41 ` Santi Béjar
2008-03-05 20:44 ` Alex Riesen
2008-03-06 21:45 ` Santi Béjar
2008-03-07 16:41 ` Alex Riesen
2008-03-08 0:13 ` Santi Béjar
2008-03-08 1:24 ` Johannes Schindelin
2008-03-08 2:08 ` Junio C Hamano
2008-03-08 2:22 ` Johannes Schindelin
2008-03-05 21:01 ` Jakub Narebski
2008-03-05 22:35 ` Santi Béjar
2008-03-05 21:29 ` Junio C Hamano
2008-03-05 22:33 ` Santi Béjar
2008-03-05 22:53 ` Junio C Hamano
2008-03-05 23:23 ` Santi Béjar
2008-03-05 23:29 ` Junio C Hamano
2008-03-05 23:39 ` Santi Béjar
2008-03-06 0:29 ` Junio C Hamano
2008-03-06 8:08 ` Santi Béjar [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8aa486160803060008g4dc3cb8cg6bfce8d2f88461d3@mail.gmail.com \
--to=sbejar@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).