Ulrich Windl asked whether foo*.log would cover both foo.log and foo-whatever.log. He noted that the manual says an asterisk matches anything except a slash, but does not say whether the match can be empty.
Junio C Hamano called it a very good point. He said the reference to fnmatch(3) may not lead readers to consult that page, and that a system may not even have man. As he explained it, fnmatch(3) often refers to glob(7), which typically says an unbracketed * matches any string, including the empty string. The FNM_PATHNAME reference is an attempt to point back to fnmatch(3), which would typically say the wildcard does not match a slash.
Hamano then proposed rewriting the entry in the gitignore documentation to reduce external references, and posted a draft patch with the subject "gitignore: rewrite wildcard description". The full text of the draft is not in the excerpts.