Skip to content

Commit

Permalink
merge script: notice @{-1} shorthand
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jonathan Nieder authored and Junio C Hamano committed Aug 18, 2010
1 parent 2a70fa4 commit c2c9a87
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions contrib/examples/git-merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c2c9a87

Please sign in to comment.