Re: [PATCH 0/5] Make :(attr) pathspec work with "git log"
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 19, 2018, 01:49 UTC
- Message-ID
- <xmqqo9aleszv.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20181118164800.32759-1-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
> But this also reveals an interesting thing: even though we walk on a > tree, we check attributes from _worktree_ (and optionally fall back to > the index). This is how attributes are implemented since forever. I > think this is not a big deal if we communicate clearly with the user.
This is pretty much deliberately designed to be so; the set of the attributes in HEAD may be stale but by taking the contents from the working tree the user can work it around.
> The main patch is the last one. The others are just to open a path to > pass "struct index_state *" down to tree_entry_interesting(). This may > become standard procedure because we don't want to stick the_index (or > the_repository) here and there.
Yup.