Re: Multiple user.name and user.email (possible feature request)

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

 



On Apr 18, Steven Michalske wrote:
> 
> I have three different email address for different repositories on my  
> computer.  I have my global config set with my most common address,  
> and the repositories with the less common email set locally in the  
> repository.

(As already guessed) I really do want it to error instead of guessing.
My problem is that I'm very often checking out trees of one project
(and starting from today that svn-checkout has been replaced by a git
clone), and I will definitely get confused.  (It seems to me that this
is a common source of problems, leading to much flammage.)


On Apr 18, Jeff King wrote:
> 
> Sine 1.7.0, git will complain loudly if you simply don't have your
> identity set at all. There is no way to make it actually refuse the
> commit, but the warning is quite gigantic and hard to miss:
> [...]
> So I expect that will serve Eli's purpose.

Well, that would get closer, but I'd really prefer if there was a
do-not-use-me value I could set.  But in any case, even this is not
working for me -- digging through my environment, I found that I have
EMAIL set to my email, and so git guesses my name and doesn't produce
that huge response.

Worse, if I set up

  [user]
    name = ""
    email = ""

in my ~/.gitconfig (and make sure that I don't have EMAIL set), then
git still guesses the values -- without any warning.


On Apr 18, Jeff King wrote:
> On Sun, Apr 18, 2010 at 08:43:11PM +0200, Sverre Rabbelier wrote:
> > 
> > If it does not, would a pre-commit hook work? If he sets some
> > recognizable string (such as not setting it) as email and install
> > a hook that barfs if it sees that?
> 
> Yeah, that could work. It would do what he wants, but he would have
> to have the hook set up. Which means he either needs to remember to
> configure it in each repository (at which point he could just
> remember to configure his identity), or he needs to point to a
> special init template directory with the hook.
> 
> I think setting init.templatedir or GIT_TEMPLATE_DIR in the
> environment would accomplish the latter.

Yes, that sounds like it will work, and I'll do that.  But in general
this well beyond what most people would do.  If it was done as I
suggested (actually, how I thought it would behave), then this whole
thing would be easy even for people who are afraid of shell
programming...

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!
--
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]