attr: add GIT_ATTR_INDEX "direction"

This instructs attr mechanism, not to look into working .gitattributes
at all. Needed by tools that does not handle working directory, such
as "git archive".

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nguyễn Thái Ngọc Duy
2009-04-18 00:17:58 +02:00
committed by Junio C Hamano
parent ad94657fdb
commit 4191e80a3e
2 changed files with 11 additions and 4 deletions

3
attr.h
View File

@ -33,7 +33,8 @@ int git_checkattr(const char *path, int, struct git_attr_check *);
enum git_attr_direction {
GIT_ATTR_CHECKIN,
GIT_ATTR_CHECKOUT
GIT_ATTR_CHECKOUT,
GIT_ATTR_INDEX,
};
void git_attr_set_direction(enum git_attr_direction, struct index_state *);