Skip to content

Commit 9902b5e

Browse files
committed
fixup! ident: add the ability to provide a "fallback identity"
In preparation for a newer patch series. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 6210c67 commit 9902b5e

File tree

2 files changed

+0
-21
lines changed

2 files changed

+0
-21
lines changed

cache.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1518,7 +1518,6 @@ extern const char *git_sequence_editor(void);
15181518
extern const char *git_pager(int stdout_is_tty);
15191519
extern int is_terminal_dumb(void);
15201520
extern int git_ident_config(const char *, const char *, void *);
1521-
void prepare_fallback_ident(const char *name, const char *email);
15221521
extern void reset_ident_date(void);
15231522

15241523
struct ident_split {

ident.c

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -505,26 +505,6 @@ int git_ident_config(const char *var, const char *value, void *data)
505505
return 0;
506506
}
507507

508-
static void set_env_if(const char *key, const char *value, int *given, int bit)
509-
{
510-
if ((*given & bit) || getenv(key))
511-
return; /* nothing to do */
512-
setenv(key, value, 0);
513-
*given |= bit;
514-
}
515-
516-
void prepare_fallback_ident(const char *name, const char *email)
517-
{
518-
set_env_if("GIT_AUTHOR_NAME", name,
519-
&author_ident_explicitly_given, IDENT_NAME_GIVEN);
520-
set_env_if("GIT_AUTHOR_EMAIL", email,
521-
&author_ident_explicitly_given, IDENT_MAIL_GIVEN);
522-
set_env_if("GIT_COMMITTER_NAME", name,
523-
&committer_ident_explicitly_given, IDENT_NAME_GIVEN);
524-
set_env_if("GIT_COMMITTER_EMAIL", email,
525-
&committer_ident_explicitly_given, IDENT_MAIL_GIVEN);
526-
}
527-
528508
static int buf_cmp(const char *a_begin, const char *a_end,
529509
const char *b_begin, const char *b_end)
530510
{

0 commit comments

Comments
 (0)