git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Tushar Kapila <tgkprog@gmail.com>
To: git@vger.kernel.org
Subject: feature request: user email config per domain
Date: Wed, 22 Feb 2017 18:42:02 +0530	[thread overview]
Message-ID: <CAN0Skmmjd5Y0uWz_WC69mAStucZ6nR0mjdp4-ODJz2UnTaB-eQ@mail.gmail.com> (raw)

I can set my email via:
git config --global user.email tgkprog@xyz.dom

this is dangerous when I use this my office or in a multi repository
provider environment where my email is different for a few (like
tgkprog@search.com for github and tushar@mycompany.com for my company
private repo). I know I can over ride it per repository, but sometimes
forget to do that. And even if I unset it, it inadvertantly gets set
elsewhere when I make a repo and the site 'helps' me by showing me the
commands to init and clone my new repo.
I did an analysis on a bunch of company git repositories using jgit
(only master branch), and we have 57 emails out of 346 which are not
the company email. Also in there are cases when name is the same but
some commits are by email 1 and others by email 2, because of this
global config. As some of us work on open source and company repos on
the same computer.

Feature request :  can we have a config for email per repo domain ?
Something like:

git config --global domain.user.email tgkprog@test.xyz.com
testing.abc.doman:8080

git config --global domain.user.email tgkprog@xyz.com abc.doman:80

git config --global domain.user.email tgkprog@search.com github.com

So when remote URL has github.com push as tgkprog@search.com but for
testing.abc.doman:8080 use tgkprog@test.xyz.com ?

For me one name is enough. But can do the same for name if others need it?

Thank you.

Regards
Tushar Kapila

             reply	other threads:[~2017-02-22 13:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-22 13:12 Tushar Kapila [this message]
2017-02-22 13:51 ` feature request: user email config per domain Pranit Bauva
2017-02-22 23:21 ` Andrew Ardill
2017-02-23  0:42 ` Jeff King
2017-02-23  1:30 ` Igor Djordjevic BugA
2017-02-23 19:29   ` Fwd: " Igor Djordjevic

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=CAN0Skmmjd5Y0uWz_WC69mAStucZ6nR0mjdp4-ODJz2UnTaB-eQ@mail.gmail.com \
    --to=tgkprog@gmail.com \
    --cc=git@vger.kernel.org \
    /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).