summaryrefslogtreecommitdiff
path: root/t/t7517-per-repo-email.sh
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2016-02-04 09:12:38 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-02-04 21:18:48 (GMT)
commit59f929596b611d88270ac0fd3ea132b32d66d460 (patch)
tree85e899a9409daa95fbb0a73e50c6c46bdb9d5125 /t/t7517-per-repo-email.sh
parent754884255bb580df159e58defa81cdd30b5c430c (diff)
downloadgit-59f929596b611d88270ac0fd3ea132b32d66d460.zip
git-59f929596b611d88270ac0fd3ea132b32d66d460.tar.gz
git-59f929596b611d88270ac0fd3ea132b32d66d460.tar.bz2
fmt_ident: refactor strictness checks
This function has evolved quite a bit over time, and as a result, the logic for "is this an OK ident" has been sprinkled throughout. This ends up with a lot of redundant conditionals, like checking want_name repeatedly. Worse, we want to know in many cases whether we are using the "default" ident, and we do so by comparing directly to the global strbuf, which violates the abstraction of the ident_default_* functions. Let's reorganize the function into a hierarchy of conditionals to handle similar cases together. The only case that doesn't just work naturally for this is that of an empty name, where our advice is different based on whether we came from ident_default_name() or not. We can use a simple flag to cover this case. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7517-per-repo-email.sh')
0 files changed, 0 insertions, 0 deletions