git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 21 in “en/object-list-with-pathspec v4”
  1. 0/8 en/object-list-with-pathspec v4Nguyễn Thái Ngọc Duy, Sep 8, 2010
  2. 1/8 diff-no-index: use diff_tree_setup_paths()Nguyễn Thái Ngọc Duy, Sep 8, 2010
  3. 2/8 Introduce struct tree_pathspec_listNguyễn Thái Ngọc Duy, Sep 8, 2010
  4. 3/8 tree_entry_interesting(): remove dependency on struct diff_optionsNguyễn Thái Ngọc Duy, Sep 8, 2010
  5. Junio C HamanoSep 14, 2010
  6. Nguyen Thai Ngoc DuySep 14, 2010
  7. Junio C HamanoSep 14, 2010
  8. 4/8 tree-walk: move tree_entry_interesting() from tree-diff.cNguyễn Thái Ngọc Duy, Sep 8, 2010
  9. 5/8 Add testcases showing how pathspecs are ignored with rev-list --objectsNguyễn Thái Ngọc Duy, Sep 8, 2010
  10. Junio C HamanoSep 14, 2010
  11. 6/8 Make rev-list --objects work together with pathspecsNguyễn Thái Ngọc Duy, Sep 8, 2010
  12. 7/8 setup_tree_pathspec(): interpret '^' as negative pathspecNguyễn Thái Ngọc Duy, Sep 8, 2010
  13. Elijah NewrenSep 11, 2010
  14. Nguyen Thai Ngoc DuySep 13, 2010
  15. Junio C HamanoSep 14, 2010
  16. Nguyen Thai Ngoc DuySep 14, 2010
  17. 8/8 tree_entry_interesting(): support negative pathspecNguyễn Thái Ngọc Duy, Sep 8, 2010
  18. Elijah NewrenSep 11, 2010
  19. Junio C HamanoSep 14, 2010
  20. Nguyen Thai Ngoc DuySep 14, 2010
  21. Elijah NewrenSep 11, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.