From: Shawn Pearce <spearce@spearce.org>
To: Jakub Narebski <jnareb@gmail.com>, Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: git-update-ref (reflog) uses bogus author ident information
Date: Mon, 10 Jul 2006 20:32:28 -0400 [thread overview]
Message-ID: <20060711003228.GC10700@spearce.org> (raw)
In-Reply-To: <20060711002754.GB10700@spearce.org>
Shawn Pearce <spearce@spearce.org> wrote:
> Allow user.name and user.email to drive reflog entry.
>
> Apparently calling setup_ident() after git_config causes the
> user.name and user.email values read from the config file to be
> replaced with the data obtained from the host. This means that
> users who have setup their email address in user.email will instead
> be writing reflog entries with their hostname.
>
> Moving setup_ident() to before git_config in update-ref resolves
> this ordering problem.
Whoops, I forgot this line: :-)
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
> ---
> builtin-update-ref.c | 1 +
> refs.c | 1 -
> 2 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/builtin-update-ref.c b/builtin-update-ref.c
> index 00333c7..83094ab 100644
> --- a/builtin-update-ref.c
> +++ b/builtin-update-ref.c
> @@ -12,6 +12,7 @@ int cmd_update_ref(int argc, const char
> unsigned char sha1[20], oldsha1[20];
> int i;
>
> + setup_ident();
> setup_git_directory();
> git_config(git_default_config);
>
> diff --git a/refs.c b/refs.c
> index 2d9c1dc..56db394 100644
> --- a/refs.c
> +++ b/refs.c
> @@ -379,7 +379,6 @@ static int log_ref_write(struct ref_lock
> lock->log_file, strerror(errno));
> }
>
> - setup_ident();
> committer = git_committer_info(1);
> if (msg) {
> maxlen = strlen(committer) + strlen(msg) + 2*40 + 5;
> --
> 1.4.1.gc48f
prev parent reply other threads:[~2006-07-11 0:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-10 20:52 git-update-ref (reflog) uses bogus author ident information Jakub Narebski
2006-07-10 21:49 ` reflog doesn't note that commit was --amend-ed, and doesn't record pulls Jakub Narebski
2006-07-11 2:48 ` Shawn Pearce
2006-07-11 3:38 ` Shawn Pearce
2006-07-11 0:27 ` git-update-ref (reflog) uses bogus author ident information Shawn Pearce
2006-07-11 0:32 ` Shawn Pearce [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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060711003228.GC10700@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=jnareb@gmail.com \
--cc=junkio@cox.net \
/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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.