Re: [PATCH 3/8] tree_entry_interesting(): remove dependency on struct diff_options
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Sep 14, 2010, 22:33 UTC
- Message-ID
- <AANLkTimHykY5V=C7vmDoA-HCWYLJT_p4MEyfdMqXgB6+@mail.gmail.com>
- In-Reply-To
- <7vr5gw8geb.fsf@alter.siamese.dyndns.org>
2010/9/15 Junio C Hamano <gitster@pobox.com>:
Show 13 quoted lines
> Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes: > >> This function can be potentially used in more places than just >> tree-diff.c. "struct diff_options" does not make much sense outside >> diff_tree_sha1(). >> >> Moreover people seem to be agree that diff machinery should learn >> proper pathspecs too (i.e. globbing, negative pathspecs...), not just >> treating pathspecs as tree prefix. > > There is nothing improper about the prefix match. Perhaps "richer"? > I am not so sure about the need/desirability of negative match, but we > will see.
Negative match has been mentioned twice recently, once in Elijah's sparse clone [1] and once by a user [2].
[1] http://mid.gmane.org/AANLkTikJhSVJw2hXkp0j6XA+k-J-AtSYzKWumjnqqsgz@mail.gmail.com
[2] http://mid.gmane.org/AANLkTikUadS+tj3ARdRqo=PSBVhTsJaUxaJv+=4hMf4s@mail.gmail.com
> > About naming. Where else other than "tree" (in the "hierarchical > namespace" sense) context do you see pathspec? Does the struct really > need to be called TREE_pathspec_list?
Pathspecs are usually stored in a list, const char ** and I don't want to take the generic name "pathspec_list", unless we convert all to use this struct. Any suggestions of other names?
-- Duy