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 <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Michael Haggerty committed Aug 12, 2011 at 23:43 UTC 86ab7f0ccaed279271d562049c923a6264d2fc70
1 file changed +10 -16
attr.c
+10 -16
@@ -1,3 +1,12 @@
1 +/*
2 + * Handle git attributes. See gitattributes(5) for a description of
3 + * the file syntax, and Documentation/technical/api-gitattributes.txt
4 + * for a description of the API.
5 + *
6 + * One basic design decision here is that we are not going to support
7 + * an insanely large number of attributes.
8 + */
9 +
10 #define NO_THE_INDEX_COMPATIBILITY_MACROS
11 #include "cache.h"
12 #include "exec_cmd.h"
@@ -13,12 +22,7 @@ static const char git_attr__unknown[] = "(builtin)unknown";
22
23 static const char *attributes_file;
24
16 -/*
17 - * The basic design decision here is that we are not going to have
18 - * insanely large number of attributes.
19 - *
20 - * This is a randomly chosen prime.
21 - */
25 +/* This is a randomly chosen prime. */
26 #define HASHSIZE 257
27
28 #ifndef DEBUG_ATTR
@@ -103,16 +107,6 @@ struct git_attr *git_attr(const char *name)
107 return git_attr_internal(name, strlen(name));
108 }
109
106 -/*
107 - * .gitattributes file is one line per record, each of which is
108 - *
109 - * (1) glob pattern.
110 - * (2) whitespace
111 - * (3) whitespace separated list of attribute names, each of which
112 - * could be prefixed with '-' to mean "set to false", '!' to mean
113 - * "unset".
114 - */
115 -
110 /* What does a matched pattern decide? */
111 struct attr_state {
112 struct git_attr *attr;