git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/1] Add author and committer configuration settings

From
John Passaro <john.a.passaro@gmail.com>
Date
Dec 19, 2018, 20:05 UTC
Message-ID
<CAJdN7KhyTSSzTrJDPkfTMsJqojo9ReW5VeAikANPZNQSpvQBmw@mail.gmail.com>
In-Reply-To
<20181219183939.16358-2-williamh@gentoo.org>
On Wed, Dec 19, 2018 at 2:19 PM William Hubbs <williamh@gentoo.org> wrote:
Show 6 quoted lines
>
>     The author.email, author.name, committer.email and committer.name
>     settings are analogous to the GIT_AUTHOR_* and GIT_COMMITTER_*
>     environment variables, but for the git config system. This allows them
>     to be set separately for each repository.
>
Great! I didn't realize this wasn't already supported...

However your patch does seem to be missing tests. t/t7517-per-repo-email.sh would appear to be a logical place to add them.

Show 39 quoted lines
> Signed-off-by: William Hubbs <williamh@gentoo.org>
> ---
>  Documentation/config/user.txt | 20 +++++++++++
>  builtin/commit.c              |  2 +-
>  cache.h                       |  5 ++-
>  config.c                      |  6 ++++
>  ident.c                       | 68 ++++++++++++++++++++++++++++++++---
>  log-tree.c                    |  3 +-
>  sequencer.c                   |  3 +-
>  7 files changed, 97 insertions(+), 10 deletions(-)
>
> diff --git a/Documentation/config/user.txt b/Documentation/config/user.txt
> index b5b2ba1199..6ba7002252 100644
> --- a/Documentation/config/user.txt
> +++ b/Documentation/config/user.txt
> @@ -1,3 +1,23 @@
> +author.email::
> +Your email address to be recorded on the author line of any newly
> +created commits.
> +If this is not set, we use user.email.
> +
> +author.name::
> +Your full name to be recorded on the author line of any newly
> +created commits.
> +If this is not set, we use user.name.
> +
> +committer.email::
> +Your email address to be recorded on the committer line of any newly
> +created commits.
> +If this is not set, we use user.email.
> +
> +committer.name::
> +Your full name to be recorded on the committer line of any newly
> +created commits.
> +If this is not set, we use user.name.
> +
>  user.email::
>         Your email address to be recorded in any newly created commits.
>         Can be overridden by the `GIT_AUTHOR_EMAIL`, `GIT_COMMITTER_EMAIL`, and

I think it would be wise to mention the new config items under user.email and user.name as well.

Previous: William HubbsNext: Johannes Schindelin
Message 3 of 6 in “add author and committer configuration settings”
  1. 0/1 add author and committer configuration settingsWilliam Hubbs, Dec 19, 2018
  2. 1/1 Add author and committer configuration settingsWilliam Hubbs, Dec 19, 2018
  3. John PassaroDec 19, 2018
  4. Johannes SchindelinDec 21, 2018
  5. Junio C HamanoJan 2, 2019
  6. Jonathan NiederDec 19, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.