From: Pavel Roskin <proski@gnu.org>
To: Petr Baudis <pasky@suse.cz>
Cc: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>, git@vger.kernel.org
Subject: Re: [PATCH] cg-pull to stop treating "master" specially, fix fetch_local for .git/HEAD
Date: Thu, 10 Nov 2005 19:14:35 -0500 [thread overview]
Message-ID: <1131668075.3987.5.camel@dv> (raw)
In-Reply-To: <20051110234029.GE30496@pasky.or.cz>
On Fri, 2005-11-11 at 00:40 +0100, Petr Baudis wrote:
> Dear diary, on Fri, Nov 11, 2005 at 12:26:18AM CET, I got a letter
> where Josef Weidendorfer <Josef.Weidendorfer@gmx.de> said that...
> > Why would anybody want to fetch the current upstream HEAD at cg-pull
> > time? If you do this, and you have no control on the upstream
> > repository, "origin" will jump randomly around after cg-pull, depending
> > on the current HEAD of the origin repository.
>
> In public repositories, you usually set the HEAD once and it stays
> there, or when you switch it, you are really careful about it.
Correct. But if it's a concern, I think we could make some
improvements. Following approaches could be tried (starting from top,
using following steps as a fallback):
1) Use recorded branch, i.e. the branch name that was used in cg-clone.
2) Check a file specifying the default branch for cloning (let's call it
e.g. .git/default_export). Record branch name.
3) If cg-switch is implemented, another file would be likely used to
specify the default branch for local operations
(e.g. .git/default_branch). Use it. Record branch name.
4) If .git/HEAD can be recognized as link (we may need to eliminate
symlinks for that to work over remote transport), use the branch it
points to. Record branch name.
5) If .git/HEAD cannot be recognized as link, use it as the branch to
clone. Don't record the branch name. (I'm not sure if we really want
that - it's good to know what branch we are using).
6) Use "master" branch. Record branch name.
--
Regards,
Pavel Roskin
next prev parent reply other threads:[~2005-11-11 0:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-23 21:33 [PATCH] cg-pull to stop treating "master" specially, fix fetch_local for .git/HEAD Pavel Roskin
2005-11-10 19:24 ` Petr Baudis
2005-11-10 20:11 ` Pavel Roskin
2005-11-10 23:26 ` Josef Weidendorfer
2005-11-10 23:40 ` Petr Baudis
2005-11-10 23:56 ` Josef Weidendorfer
2005-11-11 0:09 ` Petr Baudis
2005-11-11 0:14 ` Pavel Roskin [this message]
2005-11-11 1:13 ` Josef Weidendorfer
2005-11-11 4:53 ` Pavel Roskin
2005-11-11 14:22 ` Josef Weidendorfer
2005-11-11 15:26 ` Pavel Roskin
2005-11-11 16:10 ` Josef Weidendorfer
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=1131668075.3987.5.camel@dv \
--to=proski@gnu.org \
--cc=Josef.Weidendorfer@gmx.de \
--cc=git@vger.kernel.org \
--cc=pasky@suse.cz \
/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).