Browse Source

doc: Correct git_attr() calls in example code

Commit 7fb0eaa2 (2010-01-17) changed git_attr() to take a string
instead of a string and a length.  Update the documentation
accordingly.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Michael Haggerty 14 years ago committed by Junio C Hamano
parent
commit
650cfc512e
  1. 10
      Documentation/technical/api-gitattributes.txt

10
Documentation/technical/api-gitattributes.txt

@ -11,9 +11,9 @@ Data Structure
`struct git_attr`:: `struct git_attr`::


An attribute is an opaque object that is identified by its name. An attribute is an opaque object that is identified by its name.
Pass the name and its length to `git_attr()` function to obtain Pass the name to `git_attr()` function to obtain the object of
the object of this type. The internal representation of this this type. The internal representation of this structure is
structure is of no interest to the calling programs. of no interest to the calling programs.


`struct git_attr_check`:: `struct git_attr_check`::


@ -72,8 +72,8 @@ static void setup_check(void)
{ {
if (check[0].attr) if (check[0].attr)
return; /* already done */ return; /* already done */
check[0].attr = git_attr("crlf", 4); check[0].attr = git_attr("crlf");
check[1].attr = git_attr("ident", 5); check[1].attr = git_attr("ident");
} }
------------ ------------



Loading…
Cancel
Save