summaryrefslogtreecommitdiff
path: root/pretty.h
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2021-06-22 16:03:54 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-06-29 03:30:17 (GMT)
commit3c7e2e8f0acfe94220cdd3bbd3a35a955ae80294 (patch)
tree9ec29aa07ed36b2b9501e824f0cfc328cda21c9e /pretty.h
parent670b81a890388c60b7032a4f5b879f2ece8c4558 (diff)
downloadgit-3c7e2e8f0acfe94220cdd3bbd3a35a955ae80294.zip
git-3c7e2e8f0acfe94220cdd3bbd3a35a955ae80294.tar.gz
git-3c7e2e8f0acfe94220cdd3bbd3a35a955ae80294.tar.bz2
pretty.h: update and expand docstring for userformat_find_requirements()
The comment only mentions "notes", but there are more fields now (and I'm about to add another). Let's make it more general, and stick the struct next to the function to make the list of possibilities obvious. While we're touching this comment, let's also mention the behavior of NULL, which some callers rely on (though in the long run, this global is pretty nasty and probably should get moved into rev_info). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pretty.h')
-rw-r--r--pretty.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/pretty.h b/pretty.h
index f034609..c81cf40 100644
--- a/pretty.h
+++ b/pretty.h
@@ -65,12 +65,15 @@ static inline int cmit_fmt_is_mail(enum cmit_fmt fmt)
return (fmt == CMIT_FMT_EMAIL || fmt == CMIT_FMT_MBOXRD);
}
+/*
+ * Examine the user-specified format given by "fmt" (or if NULL, the global one
+ * previously saved by get_commit_format()), and set flags based on which items
+ * the format will need when it is expanded.
+ */
struct userformat_want {
unsigned notes:1;
unsigned source:1;
};
-
-/* Set the flag "w->notes" if there is placeholder %N in "fmt". */
void userformat_find_requirements(const char *fmt, struct userformat_want *w);
/*