Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Aug 14, 2011
  1. @mhagger @gitster

    Unroll the loop over passes

    mhagger authored gitster committed
    The passes no longer share much code, and the unrolled code is easier
    to understand.
    
    Use a new index variable instead of num_attr for the second loop, as
    we are no longer counting attributes but rather indexing through them.
    
    Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @mhagger @gitster

    Change while loop into for loop

    mhagger authored gitster committed
    Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. @mhagger @gitster

    Determine the start of the states outside of the pass loop

    mhagger authored gitster committed
    Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  4. @mhagger @gitster

    Change parse_attr() to take a pointer to struct attr_state

    mhagger authored gitster committed
    parse_attr() only needs access to the attr_state to which it should
    store its results, not to the whole match_attr structure.  This change
    also removes the need for it to know num_attr.  Change its signature
    accordingly and add a comment.
    
    Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  5. @mhagger @gitster

    Increment num_attr in parse_attr_line(), not parse_attr()

    mhagger authored gitster committed
    num_attr is incremented iff parse_attr() returns non-NULL.  So do the
    counting in parse_attr_line() instead of within parse_attr().  This
    allows an integer rather than a pointer to an integer to be passed to
    parse_attr().
    
    Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  6. @mhagger @gitster

    Document struct match_attr

    mhagger authored gitster committed
    Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  7. @mhagger @gitster

    Add a file comment

    mhagger authored gitster committed
    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>
Commits on Aug 4, 2011
  1. @mhagger @gitster

    Rename git_checkattr() to git_check_attr()

    mhagger authored gitster committed
    Suggested by: Junio Hamano <gitster@pobox.com>
    
    Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @mhagger @gitster

    Allow querying all attributes on a file

    mhagger authored gitster committed
    Add a function, git_all_attrs(), that reports on all attributes that
    are set on a path.
    
    Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. @mhagger @gitster

    Remove redundant check

    mhagger authored gitster committed
    bootstrap_attr_stack() also checks whether attr_stack is already set.
    
    Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  4. @mhagger @gitster

    Remove redundant call to bootstrap_attr_stack()

    mhagger authored gitster committed
    prepare_attr_stack() does the same thing.
    
    Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  5. @mhagger @gitster

    Extract a function collect_all_attrs()

    mhagger authored gitster committed
    Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  6. @mhagger @gitster

    Teach prepare_attr_stack() to figure out dirlen itself

    mhagger authored gitster committed
    Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  7. @mhagger @gitster

    Provide access to the name attribute of git_attr

    mhagger authored gitster committed
    It will be present in any likely future reimplementation, and its
    availability simplifies other code.
    
    Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  8. @mhagger @gitster

    Disallow the empty string as an attribute name

    mhagger authored gitster committed
    Previously, it was possible to have a line like "file.txt =foo" in a
    .gitattribute file, after which an invocation like "git check-attr ''
    -- file.txt" would succeed.  This patch disallows both constructs.
    
    Please note that any existing .gitattributes file that tries to set an
    empty attribute will now trigger the error message "error: : not a
    valid attribute name" whereas previously the nonsense was allowed
    through.
    
    Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  9. @mhagger @gitster

    Remove anachronism from comment

    mhagger authored gitster committed
    Setting attributes to arbitrary values ("attribute=value") is now
    supported, so it is no longer necessary for this comment to justify
    prohibiting '=' in an attribute name.
    
    Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Something went wrong with that request. Please try again.