git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Allow fetching references from any namespace
@ 2007-05-11 20:35 Alex Riesen
  2007-05-11 20:54 ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Alex Riesen @ 2007-05-11 20:35 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano

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>
---
 git-parse-remote.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/git-parse-remote.sh b/git-parse-remote.sh
index 437b0c3..0506b12 100755
--- a/git-parse-remote.sh
+++ b/git-parse-remote.sh
@@ -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
-- 
1.5.2.rc3.17.ge713

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-05-13  7:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-11 20:35 [PATCH] Allow fetching references from any namespace Alex Riesen
2007-05-11 20:54 ` Junio C Hamano
2007-05-12  7:40   ` Alex Riesen
2007-05-12  7:55     ` Junio C Hamano
2007-05-13  3:48       ` Marco Costalba
2007-05-13  7:24         ` Jan Hudec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).