Skip to content

Commit 3c7e2e8

Browse files
peffgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 670b81a commit 3c7e2e8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pretty.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,15 @@ static inline int cmit_fmt_is_mail(enum cmit_fmt fmt)
6565
return (fmt == CMIT_FMT_EMAIL || fmt == CMIT_FMT_MBOXRD);
6666
}
6767

68+
/*
69+
* Examine the user-specified format given by "fmt" (or if NULL, the global one
70+
* previously saved by get_commit_format()), and set flags based on which items
71+
* the format will need when it is expanded.
72+
*/
6873
struct userformat_want {
6974
unsigned notes:1;
7075
unsigned source:1;
7176
};
72-
73-
/* Set the flag "w->notes" if there is placeholder %N in "fmt". */
7477
void userformat_find_requirements(const char *fmt, struct userformat_want *w);
7578

7679
/*

0 commit comments

Comments
 (0)