4 #include "string-list.h"
7 const char *name_begin
;
9 const char *mail_begin
;
11 const char *date_begin
;
17 #define IDENT_STRICT 1
18 #define IDENT_NO_DATE 2
19 #define IDENT_NO_NAME 4
27 const char *ident_default_name(void);
28 const char *ident_default_email(void);
30 * Prepare an ident to fall back on if the user didn't configure it.
32 void prepare_fallback_ident(const char *name
, const char *email
);
33 void reset_ident_date(void);
35 * Signals an success with 0, but time part of the result may be NULL
36 * if the input lacks timestamp and zone
38 int split_ident_line(struct ident_split
*, const char *, int);
41 * Given a commit or tag object buffer and the commit or tag headers, replaces
42 * the idents in the headers with their canonical versions using the mailmap mechanism.
44 void apply_mailmap_to_header(struct strbuf
*, const char **, struct string_list
*);
47 * Compare split idents for equality or strict ordering. Note that we
48 * compare only the ident part of the line, ignoring any timestamp.
50 * Because there are two fields, we must choose one as the primary key; we
51 * currently arbitrarily pick the email.
53 int ident_cmp(const struct ident_split
*, const struct ident_split
*);
55 const char *git_author_info(int);
56 const char *git_committer_info(int);
57 const char *fmt_ident(const char *name
, const char *email
,
58 enum want_ident whose_ident
,
59 const char *date_str
, int);
60 const char *fmt_name(enum want_ident
);
62 int committer_ident_sufficiently_given(void);
63 int author_ident_sufficiently_given(void);
65 struct config_context
;
66 int git_ident_config(const char *, const char *, const struct config_context
*,