[PATCH] Documentation: correct typo in example

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] Documentation: correct typo in example

Stefan Beller-4
The example want's to explain how 'To see how attributes "crlf" and
"indent" are set for different paths.'

Spell the selected attribute correctly.

Signed-off-by: Stefan Beller <[hidden email]>
---
 Documentation/technical/api-gitattributes.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/technical/api-gitattributes.txt b/Documentation/technical/api-gitattributes.txt
index 2602668..0d7e98c 100644
--- a/Documentation/technical/api-gitattributes.txt
+++ b/Documentation/technical/api-gitattributes.txt
@@ -74,7 +74,7 @@ static void setup_check(void)
  if (check[0].attr)
  return; /* already done */
  check[0].attr = git_attr("crlf");
- check[1].attr = git_attr("ident");
+ check[1].attr = git_attr("indent");
 }
 ------------
 
--
2.8.2.397.g23dc3dd.dirty

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [hidden email]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Documentation: correct typo in example

Junio C Hamano
Stefan Beller <[hidden email]> writes:

> The example want's to explain how 'To see how attributes "crlf" and
> "indent" are set for different paths.'
>
> Spell the selected attribute correctly.
>
> Signed-off-by: Stefan Beller <[hidden email]>
> ---
>  Documentation/technical/api-gitattributes.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/technical/api-gitattributes.txt b/Documentation/technical/api-gitattributes.txt
> index 2602668..0d7e98c 100644
> --- a/Documentation/technical/api-gitattributes.txt
> +++ b/Documentation/technical/api-gitattributes.txt
> @@ -74,7 +74,7 @@ static void setup_check(void)
>   if (check[0].attr)
>   return; /* already done */
>   check[0].attr = git_attr("crlf");
> - check[1].attr = git_attr("ident");
> + check[1].attr = git_attr("indent");
>  }
>  ------------

Technically the text and code after this patch is more "correct".

Back when I wrote the original, 530e741c (Start preparing the API
documents., 2007-11-24), however, I did mean to use "ident", iow,
the introductory text has typo, and the code sample is correct.
There wasn't any "indent" attribute that is natively recognised by
Git back then for git_attr("indent") would have made sense, either.

So perhaps update the introductory text instead?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [hidden email]
More majordomo info at  http://vger.kernel.org/majordomo-info.html