diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-11-15 12:14:32 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-11-15 12:14:32 +0900 |
commit | 093048b22913be23fe45635e8723d3aa3a185ff3 (patch) | |
tree | 06a0911c433afb298a50329663c6c1a4fb3a8e8f /Documentation/git-for-each-ref.txt | |
parent | Merge branch 'jt/submodule-tests-cleanup' (diff) | |
parent | for-each-ref: test :remotename and :remoteref (diff) | |
download | tgif-093048b22913be23fe45635e8723d3aa3a185ff3.tar.xz |
Merge branch 'js/for-each-ref-remote-name-and-ref'
The "--format=..." option "git for-each-ref" takes learned to show
the name of the 'remote' repository and the ref at the remote side
that is affected for 'upstream' and 'push' via "%(push:remotename)"
and friends.
* js/for-each-ref-remote-name-and-ref:
for-each-ref: test :remotename and :remoteref
for-each-ref: let upstream/push report the remote ref name
for-each-ref: let upstream/push optionally report the remote name
Diffstat (limited to 'Documentation/git-for-each-ref.txt')
-rw-r--r-- | Documentation/git-for-each-ref.txt | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/Documentation/git-for-each-ref.txt b/Documentation/git-for-each-ref.txt index 1d420e4cde..dffa14a795 100644 --- a/Documentation/git-for-each-ref.txt +++ b/Documentation/git-for-each-ref.txt @@ -145,18 +145,25 @@ upstream:: (behind), "<>" (ahead and behind), or "=" (in sync). `:track` also prints "[gone]" whenever unknown upstream ref is encountered. Append `:track,nobracket` to show tracking - information without brackets (i.e "ahead N, behind M"). Has - no effect if the ref does not have tracking information - associated with it. All the options apart from `nobracket` - are mutually exclusive, but if used together the last option - is selected. + information without brackets (i.e "ahead N, behind M"). ++ +For any remote-tracking branch `%(upstream)`, `%(upstream:remotename)` +and `%(upstream:remoteref)` refer to the name of the remote and the +name of the tracked remote ref, respectively. In other words, the +remote-tracking branch can be updated explicitly and individually by +using the refspec `%(upstream:remoteref):%(upstream)` to fetch from +`%(upstream:remotename)`. ++ +Has no effect if the ref does not have tracking information associated +with it. All the options apart from `nobracket` are mutually exclusive, +but if used together the last option is selected. push:: The name of a local ref which represents the `@{push}` location for the displayed ref. Respects `:short`, `:lstrip`, - `:rstrip`, `:track`, and `:trackshort` options as `upstream` - does. Produces an empty string if no `@{push}` ref is - configured. + `:rstrip`, `:track`, `:trackshort`, `:remotename`, and `:remoteref` + options as `upstream` does. Produces an empty string if no `@{push}` + ref is configured. HEAD:: '*' if HEAD matches current ref (the checked out branch), ' ' |