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

Re: [PATCH] branch & tag: Add a --no-contains option

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 8, 2017, 23:02 UTC
Message-ID
<xmqqefy71iej.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20170308202025.17900-1-avarab@gmail.com>
Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:
Show 7 quoted lines
> More notes about this patch:
>
>  * I'm not really happy with the "special attention" documentation
>    example in git-branch.txt, but it follows logically from the
>    description for --contains just above it which I think is overly
>    specific as well. IMO that entire NOTES section in git-branch.txt
>    could just be removed.

The first paragraph of the section is unrelated to the topic and I do not think anybody would miss it if it goes, but I always feel uncomfortable between --contains and --merged. I do not expect anybody needs lengthy explanation to tell --merged and --no-merged (similarly --contains and --no-contains) apart, but perhaps because I often use --with (which is a hidden synonym to --contains) and almost never --merged, and as we are adding the fourth, I find it a very good idea to extend the description to tell users what they want to use "contains" for (i.e. find the set of containers given a commit) and what they want to use "merged" for (i.e. find the set of containees given a commit).

>  * I'm adding a --without option as an alias for --no-contains for
>    consistency with --with and --contains. Since we don't even
>    document --with anymore (or test it) perhaps we shouldn't be adding
>    --without.

I do not think anybody other than me uses "--with" to begin with, so I do not care too deeply about it. If it makes the patch simpler not to support "--without", I'd be supportive if you want to drop it.

I'll review the body of the patch later.
Thanks.
Previous: Ævar Arnfjörð BjarmasonNext: Jeff King
Message 2 of 28 in “branch & tag: Add a --no-contains option”
  1. branch & tag: Add a --no-contains optionÆvar Arnfjörð Bjarmason, Mar 8, 2017
  2. Junio C HamanoMar 8, 2017
  3. Jeff KingMar 9, 2017
  4. Ævar Arnfjörð BjarmasonMar 9, 2017
  5. Jeff KingMar 9, 2017
  6. Ævar Arnfjörð BjarmasonMar 9, 2017
  7. Jeff KingMar 9, 2017
  8. 0/4 fix object flag pollution in "tag --contains"Jeff King, Mar 9, 2017
  9. 1/4 ref-filter: move ref_cbdata definition into ref-filter.cJeff King, Mar 9, 2017
  10. 2/4 ref-filter: use contains_result enum consistentlyJeff King, Mar 9, 2017
  11. 3/4 ref-filter: die on parse_commit errorsJeff King, Mar 9, 2017
  12. 4/4 ref-filter: use separate cache for contains_tag_algoJeff King, Mar 9, 2017
  13. Ævar Arnfjörð BjarmasonMar 11, 2017
  14. Ævar Arnfjörð BjarmasonMar 11, 2017
  15. Jeff KingMar 12, 2017
  16. Ævar Arnfjörð BjarmasonMar 11, 2017
  17. ref-filter: Add --no-contains option to tag/branch/for-each-refÆvar Arnfjörð Bjarmason, Mar 11, 2017
  18. Junio C HamanoMar 12, 2017
  19. Ævar Arnfjörð BjarmasonMar 12, 2017
  20. Junio C HamanoMar 12, 2017
  21. Ævar Arnfjörð BjarmasonMar 9, 2017
  22. Jeff KingMar 9, 2017
  23. Ævar Arnfjörð BjarmasonMar 10, 2017
  24. ref-filter: Add --no-contains option to tag/branch/for-each-refÆvar Arnfjörð Bjarmason, Mar 9, 2017
  25. Christian CouderMar 9, 2017
  26. Ævar Arnfjörð BjarmasonMar 10, 2017
  27. Ævar Arnfjörð BjarmasonMar 10, 2017
  28. ref-filter: Add --no-contains option to tag/branch/for-each-refÆvar Arnfjörð Bjarmason, Mar 10, 2017

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.