Here is the version 2. I incorporated Jeff's preliminary patch, and handled all push.default cases and added tests for them. Damien Robert (1): remote.c: fix handling of %(push:remoteref) Jeff King (1): remote: drop "explicit" parameter from remote_ref_for_branch() ref-filter.c | 6 +-- remote.c | 113 +++++++++++++++++++++++++++++----------- remote.h | 3 +- t/t6300-for-each-ref.sh | 29 ++++++++++- 4 files changed, 115 insertions(+), 36 deletions(-) -- Patched on top of v2.25.1-377-g2d2118b814 (git version 2.25.1)