git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Riesen <raa.lkml@gmail.com>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Allow fetching references from any namespace
Date: Sat, 12 May 2007 09:40:49 +0200	[thread overview]
Message-ID: <20070512074049.GA2410@steel.home> (raw)
In-Reply-To: <7vlkfv9j3c.fsf@assigned-by-dhcp.cox.net>

Junio C Hamano, Fri, May 11, 2007 22:54:47 +0200:
> Alex Riesen <raa.lkml@gmail.com> writes:
> 
> > 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.
> 
> Have no objection to the patch itself, but mind pointing out
> where we broke it (I suspect it is around 1.5.0)?
> 

Maybe even much earlier. According to

    git log -p --decorate -- git-fetch-script git-parse-remote-script

    commit ac4b0cff00b7629657e61a1d6e1f1a1250d03198
    Author: Junio C Hamano <junkio@cox.net>
    Date:   Sat Aug 20 02:52:24 2005 -0700

	[PATCH] Start adding the $GIT_DIR/remotes/ support.

    +canon_refs_list_for_fetch () {
    +       for ref
    +       do
    +               expr "$ref" : '.*:' >/dev/null || ref="${ref}:"
    +               remote=$(expr "$ref" : '\([^:]*\):')
    +               local=$(expr "$ref" : '[^:]*:\(.*\)')
    +               case "$remote" in
    +               '') remote=HEAD ;;
    +               *) remote="refs/heads/$remote" ;;
    +               esac
    +               case "$local" in
    +               '') local= ;;
    +               *) local="refs/heads/$local" ;;
    +               esac
    +               echo "${remote}:${local}"
    +       done
    +}

it was this way since at least Aug 2005.

  reply	other threads:[~2007-05-12  7:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2007-05-12  7:55     ` Junio C Hamano
2007-05-13  3:48       ` Marco Costalba
2007-05-13  7:24         ` Jan Hudec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070512074049.GA2410@steel.home \
    --to=raa.lkml@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).