git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@linux-m68k.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: Dun Peal <dunpealer@gmail.com>,
	Shawn Pearce <spearce@spearce.org>, Git ML <git@vger.kernel.org>
Subject: Re: Pushing symbolic references to remote repositories?
Date: Sat, 22 Dec 2012 10:26:32 +0100	[thread overview]
Message-ID: <m2ehiiv3nb.fsf@linux-m68k.org> (raw)
In-Reply-To: <7vip7vrof6.fsf@alter.siamese.dyndns.org> (Junio C. Hamano's message of "Fri, 21 Dec 2012 15:11:25 -0800")

Junio C Hamano <gitster@pobox.com> writes:

> I think that the only one and a half sensible use cases that
> unconditionally make sense to update symrefs across repositories are
> to update bare.git/HEAD symref:
>
>  - update bare.git/HEAD of a repository that is a local mirror of a
>    more authoritative repository with "git fetch --mirror", in which
>    case you do want to follow what branch is designated as the
>    primary by the project you are mirroring from;
>
>  - update bare.git/HEAD from outside by some means to change which
>    branch is the primary one for the project. Only because your
>    hosting site does not give you an easy way to do so, pushing from
>    another repository that happens to point its HEAD at a different
>    branch seems to be one plausible way to do so, but that does not
>    have to be the only way.

This is not limited to HEAD, any ref may want to be set up as a symref
at a remote repo.  For example, I want to set up a symref master ->
trunk at a repository I have no shell access to.  Without this I get
spurious error whenever I fetch from that remote (where master and trunk
are separate refs) into a local mirror which does have the symref:

>From git://repo.or.cz/emacs
   f0ae89f..5595931  master     -> master
error: Ref refs/heads/trunk is at 559593152b9de5a1c144729e0583fa7968abab22 but expected f0ae89f92326beb3f5a19e90c8f4fe0ab6197926
 ! f0ae89f..5595931  trunk      -> trunk  (unable to update local ref)

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

  reply	other threads:[~2012-12-22  9:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-21 19:53 Pushing symbolic references to remote repositories? Dun Peal
2012-12-21 21:54 ` Shawn Pearce
2012-12-21 23:11   ` Junio C Hamano
2012-12-22  9:26     ` Andreas Schwab [this message]
2012-12-22 18:27       ` Junio C Hamano
2012-12-23  1:10         ` Sitaram Chamarty

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=m2ehiiv3nb.fsf@linux-m68k.org \
    --to=schwab@linux-m68k.org \
    --cc=dunpealer@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=spearce@spearce.org \
    /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).