From: Michael Haggerty Date: Fri, 12 Aug 2011 21:43:04 +0000 (+0200) Subject: Add a file comment X-Git-Tag: v1.7.7-rc1~40^2~6 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/86ab7f0ccaed279271d562049c923a6264d2fc70 Add a file comment Consolidate here a few general comments plus links to other documentation. Delete a comment with an out-of-date description of the .gitattributes file format. Signed-off-by: Michael Haggerty Signed-off-by: Junio C Hamano --- diff --git a/attr.c b/attr.c index f6b3f7e850..6bc7ae9192 100644 --- a/attr.c +++ b/attr.c @@ -1,3 +1,12 @@ +/* + * Handle git attributes. See gitattributes(5) for a description of + * the file syntax, and Documentation/technical/api-gitattributes.txt + * for a description of the API. + * + * One basic design decision here is that we are not going to support + * an insanely large number of attributes. + */ + #define NO_THE_INDEX_COMPATIBILITY_MACROS #include "cache.h" #include "exec_cmd.h" @@ -13,12 +22,7 @@ static const char git_attr__unknown[] = "(builtin)unknown"; static const char *attributes_file; -/* - * The basic design decision here is that we are not going to have - * insanely large number of attributes. - * - * This is a randomly chosen prime. - */ +/* This is a randomly chosen prime. */ #define HASHSIZE 257 #ifndef DEBUG_ATTR @@ -103,16 +107,6 @@ struct git_attr *git_attr(const char *name) return git_attr_internal(name, strlen(name)); } -/* - * .gitattributes file is one line per record, each of which is - * - * (1) glob pattern. - * (2) whitespace - * (3) whitespace separated list of attribute names, each of which - * could be prefixed with '-' to mean "set to false", '!' to mean - * "unset". - */ - /* What does a matched pattern decide? */ struct attr_state { struct git_attr *attr;