summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-04-26 17:34:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-04-26 17:34:53 (GMT)
commit695db86ad73cc3c1dca43fb60cdf469f8d26e358 (patch)
treee0a3c3a1598564fc473864ef9a8d074a693a05ca /cache.h
parent7b90ed59fab1b288b4a9ac888d1c5a194a66c812 (diff)
parent7dfe8ad6006c105989e4e8cfb196aa4ecda3c21d (diff)
downloadgit-695db86ad73cc3c1dca43fb60cdf469f8d26e358.zip
git-695db86ad73cc3c1dca43fb60cdf469f8d26e358.tar.gz
git-695db86ad73cc3c1dca43fb60cdf469f8d26e358.tar.bz2
Merge branch 'jc/commit-hook-authorship' into maint
"git commit --author=$name" did not tell the name that was being recorded in the resulting commit to hooks, even though it does do so when the end user overrode the authorship via the "GIT_AUTHOR_NAME" environment variable. * jc/commit-hook-authorship: commit: pass author/committer info to hooks t7503: does pre-commit-hook learn authorship? ident.c: add split_ident_line() to parse formatted ident line
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index e5e1aa4..a8aceb5 100644
--- a/cache.h
+++ b/cache.h
@@ -928,6 +928,22 @@ extern const char *fmt_name(const char *name, const char *email);
extern const char *git_editor(void);
extern const char *git_pager(int stdout_is_tty);
+struct ident_split {
+ const char *name_begin;
+ const char *name_end;
+ const char *mail_begin;
+ const char *mail_end;
+ const char *date_begin;
+ const char *date_end;
+ const char *tz_begin;
+ const char *tz_end;
+};
+/*
+ * Signals an success with 0, but time part of the result may be NULL
+ * if the input lacks timestamp and zone
+ */
+extern int split_ident_line(struct ident_split *, const char *, int);
+
struct checkout {
const char *base_dir;
int base_dir_len;