summaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-12-10 13:11:42 -0800
committerJunio C Hamano <gitster@pobox.com>2019-12-10 13:11:43 -0800
commitd37cfe3b5c7ef64aff0459ce2730464120c97f30 (patch)
treef94340d8102d1062ae8aa585b197c4ac1569a7e7 /revision.c
parent99c4ff1bdabc2122a7c6a2b8df87acdd0c2dd18f (diff)
parent3798149a74f0c2b84b42b108b4fc6ce28c6ab023 (diff)
downloadgit-d37cfe3b5c7ef64aff0459ce2730464120c97f30.tar.gz
Merge branch 'dl/pretty-reference'
"git log" family learned "--pretty=reference" that gives the name of a commit in the format that is often used to refer to it in log messages. * dl/pretty-reference: SubmittingPatches: use `--pretty=reference` pretty: implement 'reference' format pretty: add struct cmt_fmt_map::default_date_mode_type pretty: provide short date format t4205: cover `git log --reflog -z` blindspot pretty.c: inline initalize format_context revision: make get_revision_mark() return const pointer completion: complete `tformat:` pretty format SubmittingPatches: remove dq from commit reference pretty-formats.txt: use generic terms for hash SubmittingPatches: use generic terms for hash
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/revision.c b/revision.c
index 7e23c5ed08..39a25e7a5d 100644
--- a/revision.c
+++ b/revision.c
@@ -3960,7 +3960,7 @@ struct commit *get_revision(struct rev_info *revs)
return c;
}
-char *get_revision_mark(const struct rev_info *revs, const struct commit *commit)
+const char *get_revision_mark(const struct rev_info *revs, const struct commit *commit)
{
if (commit->object.flags & BOUNDARY)
return "-";
@@ -3982,7 +3982,7 @@ char *get_revision_mark(const struct rev_info *revs, const struct commit *commit
void put_revision_mark(const struct rev_info *revs, const struct commit *commit)
{
- char *mark = get_revision_mark(revs, commit);
+ const char *mark = get_revision_mark(revs, commit);
if (!strlen(mark))
return;
fputs(mark, stdout);