fetch,parse-remote,fmt-merge-msg: refs/remotes/* support
We can now easily fetch and merge things from heads in the refs/remotes/ hierarchy in remote repositories. The refs/remotes/ hierarchy is likely to become the standard for tracking foreign SCMs, as well as the location of Pull: targets for tracking remote branches in newly cloned repositories. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
committed by
Junio C Hamano
parent
f2561fda36
commit
687b8be8bb
@ -86,14 +86,14 @@ canon_refs_list_for_fetch () {
|
||||
local=$(expr "$ref" : '[^:]*:\(.*\)')
|
||||
case "$remote" in
|
||||
'') remote=HEAD ;;
|
||||
refs/heads/* | refs/tags/*) ;;
|
||||
heads/* | tags/* ) remote="refs/$remote" ;;
|
||||
refs/heads/* | refs/tags/* | refs/remotes/*) ;;
|
||||
heads/* | tags/* | remotes/* ) remote="refs/$remote" ;;
|
||||
*) remote="refs/heads/$remote" ;;
|
||||
esac
|
||||
case "$local" in
|
||||
'') local= ;;
|
||||
refs/heads/* | refs/tags/*) ;;
|
||||
heads/* | tags/* ) local="refs/$local" ;;
|
||||
refs/heads/* | refs/tags/* | refs/remotes/*) ;;
|
||||
heads/* | tags/* | remotes/* ) local="refs/$local" ;;
|
||||
*) local="refs/heads/$local" ;;
|
||||
esac
|
||||
|
||||
|
||||
Reference in New Issue
Block a user