[PATCH 0/3] for-each-ref: add :remote-ref and :remote-name specifiers
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Oct 2, 2017, 13:56 UTC
- Message-ID
- <cover.1506952571.git.johannes.schindelin@gmx.de>
This introduces support for
git for-each-ref \ --format="%(merge:remote-name),%(merge:remote-ref)" git for-each-ref \ --format="%(push:remote-name),%(push:remote-ref)"
to figure out the remote nickname as well as the name of the corresponding branch on the remote.
Note: the `%(push:remote-name)` placeholder is only interpolated by the value of `branch.<name>.pushRemote`; unlike `git push`, it does not fall back to `branch.<name>.remote`. Likewise, `%(push:remote-ref)` interpolates to the empty string unless `remote.<nick>.pushRefs` is configured.
This is useful for third-party tools that need to know this type of information for tons of branches.
J Wyman (1): for-each-ref: let upstream/push optionally report merge name.
Johannes Schindelin (2): for-each-ref: let upstream/push optionally report the remote name for-each-ref: test :remote-name and :remote-ref
Documentation/git-for-each-ref.txt | 19 +++++++++++-------- ref-filter.c | 35 +++++++++++++++++++++++++++++++---- remote.c | 30 ++++++++++++++++++++++++++++++ remote.h | 2 ++ t/t6300-for-each-ref.sh | 32 ++++++++++++++++++++++++++++++++ 5 files changed, 106 insertions(+), 12 deletions(-)
base-commit: ea220ee40cbb03a63ebad2be902057bf742492fd Published-As: https://github.com/dscho/git/releases/tag/ref-filter-remote-name-v1 Fetch-It-Via: git fetch https://github.com/dscho/git ref-filter-remote-name-v1
-- 2.14.2.windows.1