@matheusbsbs / matheus-bagliano / commits / c2c9a87d4f
Fork 0

merge script: notice @{-1} shorthand

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>

Jonathan Nieder committed Aug 17, 2010 at 02:11 UTC c2c9a87d4f5a643ef93db7c39fc01c4965bf67a3
1 file changed +4 -2
contrib/examples/git-merge.sh
+4 -2
@@ -148,13 +148,15 @@ merge_name () {
148 if found_ref=$(git rev-parse --symbolic-full-name --verify \
149 "$remote" 2>/dev/null)
150 then
151 + expanded=$(git check-ref-format --branch "$remote") ||
152 + exit
153 if test "${found_ref#refs/heads/}" != "$found_ref"
154 then
153 - echo "$rh branch '$remote' of ."
155 + echo "$rh branch '$expanded' of ."
156 return
157 elif test "${found_ref#refs/remotes/}" != "$found_ref"
158 then
157 - echo "$rh remote branch '$remote' of ."
159 + echo "$rh remote branch '$expanded' of ."
160 return
161 fi
162 fi