Re: git and time
- From
Shawn Pearce <spearce@spearce.org>
- Date
- Sep 27, 2006, 21:36 UTC
- Message-ID
- <20060927213607.GA21839@spearce.org>
- In-Reply-To
- <7v1wpx9gwk.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> wrote:
Show 13 quoted lines
> Shawn Pearce <spearce@spearce.org> writes: > > > You are missing: > > + setup_ident(); > > > > Without that reflog can't get the proper committer data from the > > host's gecos information. This is probably what is desired for > > most pushes over SSH. > > What's even more interesting is when there is .git/config file > and you do not override it with environment variables; the log > entry will be made under the name of the repository user.name in > such a case.
Yes. :-)
Shared repository owners might want to not set user.name in their config files.
Another way around this would be to create a variation of git_default_config for use in receive-pack.c that doesn't recognize user.name/user.email.
Show 10 quoted lines
> >> + git_config(git_default_config); > >> + > >> write_head_info(); > > Often setup_ident() needs to go together with git_config(), and > you need to remember that setup must come before config. These > rules are a bit cumbersome to follow and I often forget. > > I wonder if we can have a simpler start-up sequence perhaps to > avoid future mistakes like this?
I think most places we are "starting up" we invoke both, in that order. Which sort of implies maybe we could just fold setup_ident into git_config.
-- Shawn.