Skip to contentSkip to conversation

ident.c: New function valid_ident for checking ident string formatting

PATCH In review [email protected] 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ident.c: New function valid_ident for checking ident string formatting

From: Brandon Casey <[email protected]>

This function provides a centralized method for checking ident strings which can be shared by the functions creating or parsing author, committer, or tagger fields.

---
 cache.h |    1 +
 ident.c |   69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 70 insertions(+), 0 deletions(-)
cache.h +1 -0
index d5d5dad..92f21e1 100644
@@ -580,6 +580,7 @@ extern const char *git_author_info(int);
 extern const char *git_committer_info(int);
 extern const char *fmt_ident(const char *name, const char *email, const char *date_str, int);
 extern const char *fmt_name(const char *name, const char *email);
+extern int valid_ident(const char *buf, size_t size, int flag);
 
 struct checkout {
 	const char *base_dir;
ident.c +69 -0

75 lines not on this page · raw message

Signature · 1 line
1.5.5.67.g9a49