diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-12-22 11:27:28 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-12-22 11:27:28 -0800 |
commit | adb86762e5535108a9fb4ddc63d2e70cee2038a7 (patch) | |
tree | 1c2a59dba4cc71e18e1175f60f8299bb3169dbf5 /reflog-walk.c | |
parent | d5cb31a56aad167360ec60eb5ea2d01f5337488e (diff) | |
parent | cd1957f5fc6ecc5ae557246126d9e74c029ccd61 (diff) | |
download | git-adb86762e5535108a9fb4ddc63d2e70cee2038a7.tar.gz |
Merge branch 'jk/pretty-reglog-ent'
* jk/pretty-reglog-ent:
pretty: give placeholders to reflog identity
Diffstat (limited to 'reflog-walk.c')
-rw-r--r-- | reflog-walk.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/reflog-walk.c b/reflog-walk.c index 64c677fc49..86d18843f5 100644 --- a/reflog-walk.c +++ b/reflog-walk.c @@ -295,6 +295,18 @@ void get_reflog_message(struct strbuf *sb, strbuf_add(sb, info->message, len); } +const char *get_reflog_ident(struct reflog_walk_info *reflog_info) +{ + struct commit_reflog *commit_reflog = reflog_info->last_commit_reflog; + struct reflog_info *info; + + if (!commit_reflog) + return NULL; + + info = &commit_reflog->reflogs->items[commit_reflog->recno+1]; + return info->email; +} + void show_reflog_message(struct reflog_walk_info *reflog_info, int oneline, enum date_mode dmode) { |