summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorThomas Gummerer <t.gummerer@gmail.com>2019-03-06 22:09:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-03-07 00:41:40 (GMT)
commit0640897dc5ff1f75308d3ebb45e152aed40bb9a3 (patch)
tree821aef5beab5ca9ddc446fa2dacf935c97eb3097 /cache.h
parentfd5a58477c62ddb6ec16cf7b5b2da7597f0fa398 (diff)
downloadgit-0640897dc5ff1f75308d3ebb45e152aed40bb9a3.zip
git-0640897dc5ff1f75308d3ebb45e152aed40bb9a3.tar.gz
git-0640897dc5ff1f75308d3ebb45e152aed40bb9a3.tar.bz2
ident: don't require calling prepare_fallback_ident first
In fd5a58477c ("ident: add the ability to provide a "fallback identity"", 2019-02-25) I made it a requirement to call prepare_fallback_ident as the first function in the ident API. However in stash we didn't actually end up following that. This leads to a BUG if user.email and user.name are set. It was not caught in the test suite because we only rely on environment variables for setting the user name and email instead of the config. Instead of making it a bug to call other functions in the ident API first, just return silently if the identity of a user was already set up. Reported-by: Denton Liu <liu.denton@gmail.com> Helped-by: Jeff King <peff@peff.net> Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/cache.h b/cache.h
index 611e554..67e74b7 100644
--- a/cache.h
+++ b/cache.h
@@ -1493,7 +1493,6 @@ extern int is_terminal_dumb(void);
extern int git_ident_config(const char *, const char *, void *);
/*
* Prepare an ident to fall back on if the user didn't configure it.
- * Must be called before any other function from the ident API.
*/
void prepare_fallback_ident(const char *name, const char *email);
extern void reset_ident_date(void);