Thread (3 messages) 3 messages, 3 authors, 2021-03-08

Re: [PATCH] fix: added new BANNED_EXPL macro for better error messages, new parameter

flat view

From: Jeff King <hidden>
Date: 2021-03-08 18:31:03

On Mon, Mar 08, 2021 at 01:05:46PM -0500, Taylor Blau wrote:
quoted
Adding a comment around each of these definition may be OK.  Upon
seeing foo_is_a_banned_function, somebody new to the codebase would
look for where it is banned, and find the above, so that is a good
place to give guidance.
Perhaps, but all of this information is already covered accurately in
the patches that introduced each banned function. So I'm not sure that I
even agree that this information is difficult to discover to begin with,
but I may be biased.
Yeah, certainly my intent when I introduced banned.h was that people
would get the full reasoning from the commit log. I figured Git
developers could run "git log -S" or "git blame".

I'm not opposed to comments if somebody wants to write them, but it's
not clear to whether people who are actively writing patches for Git
have actually run into this situation and been confused, or if this is
bikeshedding from the recent posting of banned.h on Hacker News. (Even
if it is the latter, I am OK taking a patch that adds comments; I just
doubt that it's a good use of anybody's time).

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help