ident: split setup_ident into separate functions
commitbcb2b0044b3baedf7857613ec069f300c364680c
authorJeff King <peff@peff.net>
Mon, 21 May 2012 23:09:43 +0000 (21 19:09 -0400)
committerJunio C Hamano <gitster@pobox.com>
Tue, 22 May 2012 16:07:52 +0000 (22 09:07 -0700)
tree61dac600dabd49b867ae598f4243a9c5ba12b041
parentcd07cc53125fb2ca77a644831d4e5d9517bb7a05
ident: split setup_ident into separate functions

This function sets up the default name, email, and date, and
is not publicly available. Let's split it into three public
functions so that callers can get just the parts they need.

While we're at it, let's change the interface to simple
accessors. The original function was called only by fmt_ident,
and contained logic for "if we already have some other
value, don't load the default" which properly belongs in
fmt_ident.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache.h
ident.c