]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Doc: cover multiple contains/no-contains filters
authorAaron Lipman <alipman88@gmail.com>
Wed, 16 Sep 2020 02:08:39 +0000 (22:08 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 16 Sep 2020 19:38:09 +0000 (12:38 -0700)
Update documentation for "git branch", "git for-each-ref" and "git tag"
with notes explaining what happens when passed multiple --contains or
--no-contains filters.

This behavior is useful to document prior to enabling multiple
merged/no-merged filters, in order to demonstrate consistent behavior
between merged/no-merged and contains/no-contains filters.

Signed-off-by: Aaron Lipman <alipman88@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/filters.txt [new file with mode: 0644]
Documentation/git-branch.txt
Documentation/git-for-each-ref.txt
Documentation/git-tag.txt

diff --git a/Documentation/filters.txt b/Documentation/filters.txt
new file mode 100644 (file)
index 0000000..4ee17af
--- /dev/null
@@ -0,0 +1,3 @@
+When combining multiple `--contains` and `--no-contains` filters, only
+references that contain at least one of the `--contains` commits and
+contain none of the `--no-contains` commits are shown.
index 03c0824d528a0132b1d1eb2d7ac3eb7ddc461d21..aa5e4da142a60194bd59bf667dbf51af72c5fa81 100644 (file)
@@ -370,6 +370,8 @@ serve four related but different purposes:
 - `--no-merged` is used to find branches which are candidates for merging
   into HEAD, since those branches are not fully contained by HEAD.
 
+include::filters.txt[]
+
 SEE ALSO
 --------
 linkgit:git-check-ref-format[1],
index 616ce460872f0f93ff5944a36bb0b0a20920485d..c207ed9551b29ccd00f803274cb2a77732628af0 100644 (file)
@@ -408,6 +408,11 @@ Note also that multiple copies of an object may be present in the object
 database; in this case, it is undefined which copy's size or delta base
 will be reported.
 
+NOTES
+-----
+
+include::filters.txt[]
+
 SEE ALSO
 --------
 linkgit:git-show-ref[1]
index f6d9791780288ff077f5c4bbd0fa4c4c47cd9cea..dadbd71d62b86ce01c3ed43889f522d08b2e0cea 100644 (file)
@@ -377,6 +377,11 @@ $ GIT_COMMITTER_DATE="2006-10-02 10:31" git tag -s v1.0.1
 
 include::date-formats.txt[]
 
+NOTES
+-----
+
+include::filters.txt[]
+
 SEE ALSO
 --------
 linkgit:git-check-ref-format[1].