Introduce %<branch> as shortcut to the tracked branchpercent-branch
commite090e3c49baf4f76e64bf7260ee76b0003614bdd
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Wed, 18 Mar 2009 21:09:31 +0000 (18 22:09 +0100)
committerJohannes Schindelin <johannes.schindelin@gmx.de>
Thu, 19 Mar 2009 18:41:48 +0000 (19 19:41 +0100)
tree7f7ebadf356aa62c20959d6f1dd25719e4f1e4ca
parentb5e8216954396087e54e9c83d2313f4bc385db2e
Introduce %<branch> as shortcut to the tracked branch

Often, it is quite interesting to inspect the branch tracked by a given
branch.  This patch introduces a nice notation to get at the tracked
branch: '%<branch>' can be used to access that tracked branch.

A special shortcut '%' refers to the branch tracked by the current branch.

Suggested by Pasky.

This patch extends the function introduced to handle the nth-last branch
(via the {-<n>} notation); therefore that function name was renamed to
something more general.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Documentation/git-rev-parse.txt
sha1_name.c
t/t1506-rev-parse-tracked.sh [new file with mode: 0755]