Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-08-13 19:14:33 +0300
committerJunio C Hamano <gitster@pobox.com>2018-08-14 00:14:43 +0300
commitc4500e251f89cbbc49fe90b832348ea9d4899946 (patch)
treeb4d5fa523ffd904e1cc061172230d4af6e50f7ed /archive.c
parent74cfc0ee1d0b4e386b5a07f8b79fbcece94cdff8 (diff)
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 'archive.c')
-rw-r--r--archive.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/archive.c b/archive.c
index c81e35bf23..aca9179d03 100644
--- a/archive.c
+++ b/archive.c
@@ -274,7 +274,7 @@ int write_archive_entries(struct archiver_args *args,
init_tree_desc(&t, args->tree->buffer, args->tree->size);
if (unpack_trees(1, &t, &opts))
return -1;
- git_attr_set_direction(GIT_ATTR_INDEX, &the_index);
+ git_attr_set_direction(GIT_ATTR_INDEX);
}
err = read_tree_recursive(args->tree, "", 0, 0, &args->pathspec,