[PATCH 23/24] merge script: notice @{-1} shorthand
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Aug 17, 2010, 07:11 UTC
- Message-ID
- <20100817071130.GW22057@burratino>
- In-Reply-To
- <20100817065147.GA18293@burratino>
Port v1.6.2-rc1~10^2 (Teach @{-1} to git merge, 2009-02-13) to the old merge script.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> --- contrib/examples/git-merge.sh | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/contrib/examples/git-merge.sh b/contrib/examples/git-merge.sh index 5a2addd..bed55a4 100755 --- a/contrib/examples/git-merge.sh +++ b/contrib/examples/git-merge.sh @@ -148,13 +148,15 @@ merge_name () { if found_ref=$(git rev-parse --symbolic-full-name --verify \ "$remote" 2>/dev/null) then + expanded=$(git check-ref-format --branch "$remote") || + exit if test "${found_ref#refs/heads/}" != "$found_ref" then - echo "$rh branch '$remote' of ." + echo "$rh branch '$expanded' of ." return elif test "${found_ref#refs/remotes/}" != "$found_ref" then - echo "$rh remote branch '$remote' of ." + echo "$rh remote branch '$expanded' of ." return fi fi
-- 1.7.2.1.544.ga752d.dirty