{"thread":{"id":"55283","subject":"git branch: filtering by formatted ref when using --format and --list flags","startedAt":"2021-03-10T13:37:34Z","lastAt":"2021-03-10T13:37:34Z","messageCount":1,"participants":["Aaron Lipman"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"418686","messageId":"CAEJZ43juPmz2z+J45hJCBzCAG6seG4qbvPh3we4f3iexeU5r+Q@mail.gmail.com","threadId":"55283","inReplyTo":null,"subject":"git branch: filtering by formatted ref when using --format and --list flags","fromName":"Aaron Lipman","fromEmail":"alipman88@gmail.com","sentAt":"2021-03-10T13:36:10Z","receivedAt":"2021-03-10T13:37:34Z","isPatch":false,"sender":{"key":"alipman88@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3922511?v=4"},"body":"A few days ago, I wanted to list my branches on a remote. (By \"my\nbranches\", I mean branches whose head commit I authored.) The first\ncommand I tried was:\n\ngit branch -r --format '%(refname:short) %(authoremail)' \\\n              --list '*aaron@example.com*'\n\nHowever, the --list flag only applies filtering using plain refname,\nnot custom-formatted refs. So I just used grep:\n\ngit branch -r --format '%(refname:short) %(authoremail)' |\n  grep 'aaron@example.com'\n\nEven though grep works fine, I'd find it convenient for git branch/tag\nto filter formatted refs when passed both --format and --list flags. I\nhave a patch series implementing this, but before I polish my work to\nget it submission ready, I wanted to check whether others feel this is\na worthwhile change. Feedback welcome.\n"}]}