From: Michael Haggerty <mhagger@alum.mit.edu>
To: git@vger.kernel.org
Cc: gitster@pobox.com, Michael Haggerty <mhagger@alum.mit.edu>
Subject: [PATCH 1/7] Add a file comment
Date: Fri, 12 Aug 2011 23:43:04 +0200 [thread overview]
Message-ID: <1313185390-19724-2-git-send-email-mhagger@alum.mit.edu> (raw)
In-Reply-To: <1313185390-19724-1-git-send-email-mhagger@alum.mit.edu>
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>
---
attr.c | 26 ++++++++++----------------
1 files changed, 10 insertions(+), 16 deletions(-)
diff --git a/attr.c b/attr.c
index f6b3f7e..6bc7ae9 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;
--
1.7.6.8.gd2879
next prev parent reply other threads:[~2011-08-12 21:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-12 21:43 [PATCH 0/7] Comments and refactoring in attr.c Michael Haggerty
2011-08-12 21:43 ` Michael Haggerty [this message]
2011-08-12 21:43 ` [PATCH 2/7] Document struct match_attr Michael Haggerty
2011-08-12 21:43 ` [PATCH 3/7] Increment num_attr in parse_attr_line(), not parse_attr() Michael Haggerty
2011-08-12 21:43 ` [PATCH 4/7] Change parse_attr() to take a pointer to struct attr_state Michael Haggerty
2011-08-12 21:43 ` [PATCH 5/7] Determine the start of the states outside of the pass loop Michael Haggerty
2011-08-12 21:43 ` [PATCH 6/7] Change while loop into for loop Michael Haggerty
2011-08-12 21:43 ` [PATCH 7/7] Unroll the loop over passes Michael Haggerty
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1313185390-19724-2-git-send-email-mhagger@alum.mit.edu \
--to=mhagger@alum.mit.edu \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).