Re: [PATCH v2 1/3] for-each-ref: let upstream/push optionally report the remote name

2017-10-10 Thread Junio C Hamano
Johannes Schindelin writes: > The implementation chooses *not* to DWIM the push remote if no explicit > push remote was configured; The reason is that it is possible to DWIM this > by using > > %(if)%(push:remotename)%(then) > %(push:remotename) >

Re: [PATCH v2 1/3] for-each-ref: let upstream/push optionally report the remote name

2017-10-10 Thread Junio C Hamano
Johannes Schindelin writes: > There are times when e.g. scripts want to know not only the name of the > upstream branch on the remote repository, but also the name of the > remote. > > This patch offers the new suffix :remotename for the upstream and for > the push

[PATCH v2 1/3] for-each-ref: let upstream/push optionally report the remote name

2017-10-05 Thread Johannes Schindelin
There are times when e.g. scripts want to know not only the name of the upstream branch on the remote repository, but also the name of the remote. This patch offers the new suffix :remotename for the upstream and for the push atoms, allowing to show exactly that. Example: $ cat