Merge branch 'kn/attr-from-tree'

"git check-attr" learned to take an optional tree-ish to read the
.gitattributes file from.

* kn/attr-from-tree:
  attr: add flag `--source` to work with tree-ish
  t0003: move setup for `--all` into new block
This commit is contained in:
Junio C Hamano
2023-01-23 13:39:50 -08:00
12 changed files with 156 additions and 55 deletions

View File

@ -730,7 +730,7 @@ int match_pathspec_attrs(struct index_state *istate,
if (name[namelen])
name = to_free = xmemdupz(name, namelen);
git_check_attr(istate, name, item->attr_check);
git_check_attr(istate, NULL, name, item->attr_check);
free(to_free);