git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] attr: update a stale comment on "struct match_attr"

From
Junio C Hamano <gitster@pobox.com>
Date
May 15, 2016, 22:59 UTC
Message-ID
<xmqq60uf3p37.fsf@gitster.mtv.corp.google.com>

When 82dce998 (attr: more matching optimizations from .gitignore, 2012-10-15) changed a pointer to a string "*pattern" into an embedded "struct pattern" in struct match_attr, it forgot to update the comment that describes the structure.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 attr.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/attr.c b/attr.c
index eec5d7d..94b27f4 100644
--- a/attr.c
+++ b/attr.c
@@ -131,9 +131,8 @@ struct pattern {
  * If is_macro is true, then u.attr is a pointer to the git_attr being
  * defined.
  *
- * If is_macro is false, then u.pattern points at the filename pattern
- * to which the rule applies.  (The memory pointed to is part of the
- * memory block allocated for the match_attr instance.)
+ * If is_macro is false, then u.pat is the filename pattern to which the
+ * rule applies.
  *
  * In either case, num_attr is the number of attributes affected by
  * this rule, and state is an array listing them.  The attributes are
-- 
2.8.2-748-gfb85f76
Message 1 of 1 in “attr: update a stale comment on "struct match_attr"”
  1. attr: update a stale comment on "struct match_attr"Junio C Hamano, May 15, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.