author | René Scharfe <rene.scharfe@lsrfire.ath.cx> | |
Sun, 8 Jun 2008 15:16:11 +0000 (17:16 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 9 Jun 2008 22:08:26 +0000 (15:08 -0700) | ||
commit | 2d35d556e27cd3e7f3d2eea04a7f0d7ee8513f8e | |
tree | e2892612e2806116ba0a3a0290d94c1b80bac4b4 | tree | snapshot |
parent | 457bb452919887ff5e8007d02e93f443fdb6f1e9 | commit | diff |
Ignore .gitattributes in bare repositories
Attributes can be specified at three different places: the internal
table of default values, the file $GIT_DIR/info/attributes and files
named .gitattributes in the work tree. Since bare repositories don't
have a work tree, git should ignore any .gitattributes files there.
This patch makes git do that, so the only way left for a user to specify
attributes in a bare repository is the file info/attributes (in addition
to changing the defaults and recompiling).
In addition, git-check-attr is now allowed to run without a work tree.
Like any user of the code in attr.c, it ignores the .gitattributes files
when run in a bare repository. It can still read from info/attributes.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Attributes can be specified at three different places: the internal
table of default values, the file $GIT_DIR/info/attributes and files
named .gitattributes in the work tree. Since bare repositories don't
have a work tree, git should ignore any .gitattributes files there.
This patch makes git do that, so the only way left for a user to specify
attributes in a bare repository is the file info/attributes (in addition
to changing the defaults and recompiling).
In addition, git-check-attr is now allowed to run without a work tree.
Like any user of the code in attr.c, it ignores the .gitattributes files
when run in a bare repository. It can still read from info/attributes.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
attr.c | diff | blob | history | |
git.c | diff | blob | history | |
t/t0003-attributes.sh | diff | blob | history |