git branch: filtering by formatted ref when using --format and --list flags

From: Aaron Lipman <hidden>
Date: 2021-03-10 13:37:34

A few days ago, I wanted to list my branches on a remote. (By "my
branches", I mean branches whose head commit I authored.) The first
command I tried was:

git branch -r --format '%(refname:short) %(authoremail)' \
              --list '*aaron@example.com*'

However, the --list flag only applies filtering using plain refname,
not custom-formatted refs. So I just used grep:

git branch -r --format '%(refname:short) %(authoremail)' |
  grep 'aaron@example.com'

Even though grep works fine, I'd find it convenient for git branch/tag
to filter formatted refs when passed both --format and --list flags. I
have a patch series implementing this, but before I polish my work to
get it submission ready, I wanted to check whether others feel this is
a worthwhile change. Feedback welcome.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help