diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2018-08-13 18:14:33 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-08-13 14:14:43 -0700 |
commit | c4500e251f89cbbc49fe90b832348ea9d4899946 (patch) | |
tree | b4d5fa523ffd904e1cc061172230d4af6e50f7ed /attr.h | |
parent | 74cfc0ee1d0b4e386b5a07f8b79fbcece94cdff8 (diff) | |
download | git-c4500e251f89cbbc49fe90b832348ea9d4899946.tar.gz |
attr: remove index from git_attr_set_direction()
Since attr checking API now take the index, there's no need to set an
index in advance with this call. Most call sites are straightforward
because they either pass the_index or NULL (which defaults back to
the_index previously). There's only one suspicious call site in
unpack-trees.c where it sets a different index.
This code in unpack-trees is about to check out entries from the
new/temporary index after merging is done in it. The attributes will
be used by entry.c code to do crlf conversion if needed. entry.c now
respects struct checkout's istate field, and this field is correctly
set in unpack-trees.c, there should be no regression from this change.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'attr.h')
-rw-r--r-- | attr.h | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -77,8 +77,7 @@ enum git_attr_direction { GIT_ATTR_CHECKOUT, GIT_ATTR_INDEX }; -void git_attr_set_direction(enum git_attr_direction new_direction, - const struct index_state *istate); +void git_attr_set_direction(enum git_attr_direction new_direction); void attr_start(void); |