Re: [PATCH] user.default: New config to prevent using the default values for user.*

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Santi Béjar" <sbejar@xxxxxxxxx> writes:

> On Thu, Mar 6, 2008 at 12:29 AM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
>> "Santi Béjar" <sbejar@xxxxxxxxx> 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.

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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux