mbox series

[v3,0/3] git branch: allow combining merged and no-merged filters

Message ID 20200913193140.66906-1-alipman88@gmail.com (mailing list archive)
Headers show
Series git branch: allow combining merged and no-merged filters | expand

Message

Aaron Lipman Sept. 13, 2020, 7:31 p.m. UTC
> It is a bit sad that this only removes from documentation without
> adding (the removal is because merged and no-merged are no longer
> mutually exclusive)...
>
> Perhaps --contains side can already be combined so they have
> description we can borrow here?  I didn't look too carefully.

Sounds good, I've added documentation covering both multiple contains/
no-contains and merged/no-merged filters to the notes sections of the
doc files for branch, for-each-ref & tag. (There was no existing
documentation for --contains, so I added that in commit 2/3.)

> We do not allow decl-after-statement.

Got it, fixed both locations.

> I would have expected, instead of placing the
> single object to the pending queue, the loop places all the filter
> objects in a queue, and then makes a limited revision walk just
> once.  In general, each time after the code makes a call to
> prepare_revision_walk() to perform a revision walk, before doing so
> again, the object flags used for the walking must be cleared.

Thanks for the explanation - updated accordingly. I'll plan on
studying that code as part of better familiarizing myself with
git's codebase.

Aaron Lipman (3):
  t3201: test multiple branch filter combinations
  Doc: cover multiple contains/no-contains filters
  ref-filter: allow merged and no-merged filters

 Documentation/git-branch.txt       | 17 +++++---
 Documentation/git-for-each-ref.txt | 20 ++++++---
 Documentation/git-tag.txt          | 17 ++++++--
 builtin/branch.c                   |  6 +--
 builtin/for-each-ref.c             |  2 +-
 builtin/tag.c                      |  8 ++--
 ref-filter.c                       | 64 ++++++++++++++-------------
 ref-filter.h                       |  9 +---
 t/t3200-branch.sh                  |  4 +-
 t/t3201-branch-contains.sh         | 69 ++++++++++++++++++++++++++++--
 t/t6302-for-each-ref-filter.sh     |  4 +-
 t/t7004-tag.sh                     |  2 +-
 12 files changed, 157 insertions(+), 65 deletions(-)