Skip to content

Commit

Permalink
Allow fetching references from any namespace
Browse files Browse the repository at this point in the history
not only from the three defined: heads, tags and remotes.

Noticed when I tried to fetch the references created by git-p4-import.bat:
they are placed into separate namespace (refs/p4import/, to avoid showing
them in git-branch output). As canon_refs_list_for_fetch always prepended
refs/heads/ it was impossible, and annoying: it worked before. Normally,
the p4import references are useless anywhere but in the directory managed
by perforce, but in this special case the cloned directory was supposed
to be a backup, including the p4import branch: it keeps information about
where the imported perforce state came from.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Alex Riesen authored and Junio C Hamano committed May 12, 2007
1 parent a6e3768 commit 96f12b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions git-parse-remote.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,13 @@ canon_refs_list_for_fetch () {
fi
case "$remote" in
'' | HEAD ) remote=HEAD ;;
refs/heads/* | refs/tags/* | refs/remotes/*) ;;
refs/*) ;;
heads/* | tags/* | remotes/* ) remote="refs/$remote" ;;
*) remote="refs/heads/$remote" ;;
esac
case "$local" in
'') local= ;;
refs/heads/* | refs/tags/* | refs/remotes/*) ;;
refs/*) ;;
heads/* | tags/* | remotes/* ) local="refs/$local" ;;
*) local="refs/heads/$local" ;;
esac
Expand Down

0 comments on commit 96f12b5

Please sign in to comment.