From: Sverre Rabbelier Date: Thu, 29 Oct 2009 06:40:25 GMT Subject: [PATCH 6/7] When updating refs after a fetch, resolve the symref if set Message-ID: <1256798426-21816-7-git-send-email-srabbelier@gmail.com> In-Reply-To: <1256798426-21816-1-git-send-email-srabbelier@gmail.com> This makes it possible to return in response to 'list': @refs/hg/origin/tip refs/heads/tip And have HEAD resolve properly after the import completes. Signed-off-by: Sverre Rabbelier --- Without this it is very hard to support 'git clone' on a non-git repository, which I think is a very important thing to have. transport-helper.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/transport-helper.c b/transport-helper.c index 639f08c..a361366 100644 --- a/transport-helper.c +++ b/transport-helper.c @@ -159,7 +159,7 @@ static int fetch_with_import(struct transport *transport, posn = to_fetch[i]; if (posn->status & REF_STATUS_UPTODATE) continue; - read_ref(posn->name, posn->old_sha1); + read_ref(posn->symref ? posn->symref : posn->name, posn->old_sha1); } return 0; } -- 1.6.5.2.291.gf76a3