From: Petr Baudis <pasky@suse.cz>
To: Linus Torvalds <torvalds@osdl.org>
Cc: "Shawn Pearce" <spearce@spearce.org>,
"Jakub Narebski" <jnareb@gmail.com>,
"Karl Hasselström" <kha@treskal.com>,
git@vger.kernel.org
Subject: Re: Missing features in git
Date: Tue, 14 Nov 2006 20:37:26 +0100 [thread overview]
Message-ID: <20061114193726.GG7201@pasky.or.cz> (raw)
In-Reply-To: <Pine.LNX.4.64.0611141037120.3327@woody.osdl.org>
On Tue, Nov 14, 2006 at 07:40:30PM CET, Linus Torvalds wrote:
> On Tue, 14 Nov 2006, Shawn Pearce wrote:
>
> > Jakub Narebski <jnareb@gmail.com> wrote:
> > > Dnia wtorek 14. listopada 2006 18:36, Karl Hasselström napisa?:
> > > >
> > > > For example, we could skip the "bisect" branch, since
> > > > you aren't supposed to commit to that anyway.
> > >
> > > Well, to have "branch" to which you could not commit, just put ref
> > > outside refs/heads.
> > >
> > > Another solution would be to be able to put non-head ref in HEAD,
> > > but allow to commit only if the prefix is refs/heads/
> >
> > That's not a bad idea. Then you can checkout a tag and have
> > 'ref: refs/tags/v1.11' in HEAD, which means anyone who puts
> > $(git-symbolic-ref) calls into their PS1 will see "refs/tags/v1.11"
> > as their current branch, reminding them they are looking at the past.
There's been a brief discussion on a related topic in
http://news.gmane.org/find-root.php?message_id=%3cPine.LNX.4.58.0507120938240.17536%40g5.osdl.org%3e
(apparently the Linus-has-another-totally-awesome-idea kind (no irony
(*))). Before, Cogito did basically what's proposed above to permit
again: storing a random sha1 in the HEAD when it is seeked away to some
historical commit. It switched to using a temporary branch for this
purpose, but I'm not sure about the Linus' reasoning that
"in order for a "git checkout" to not get confused and possibly
throwing a cogito temporary head away ..."
which has been apparently clear to me back then. :-(
> I agree. This would probably be a good way to do "read-only branches".
>
> Allowing people to do a "git checkout" on anything committish, but then
> not allowing them to commit to that, is probably the right thing to do.
So, the basic relaxation is that "again after a year, HEAD does not
have to be a ref at all".
> Together with a nice readable error message from "git commit" (and merge,
> and pull - although you might well allow "fetch" to update the thing that
> current HEAD points to, though), this would be a lot easier to use for
> people who just follow somebody elses branch.
Hmm, so that there would be something like refs/tracking/master as an
alternative to refs/heads/master? I'm not really sure if it is a good
idea. On one hand, you can relax my favorite fastforward restrictions on
those tracking branches, but I think the net worth is negative since you
will have to burden new users with yet another concept of "readonly
branches", tell them things like "either do git clone --no-tracking or
the first time you will want to commit something locally, create a
'head' using git checkout -b master HEAD" (you are already on a "master"
branch but it's a different "master", you know?) etc.
(*) You never are ironical about Linus, the Chuck Norris of CS. (And a
hero, too!)
--
Petr "Pasky the Wow Pruit Igoe is
Awesome Too!" Baudis
Stuff: http://pasky.or.cz/
#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
next prev parent reply other threads:[~2006-11-14 19:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-14 13:49 Missing features in git linux
2006-11-14 14:53 ` Jakub Narebski
2006-11-14 15:47 ` Karl Hasselström
2006-11-14 17:15 ` Jakub Narebski
2006-11-14 17:36 ` Karl Hasselström
2006-11-14 17:45 ` Jakub Narebski
2006-11-14 17:49 ` Shawn Pearce
2006-11-14 18:40 ` Linus Torvalds
2006-11-14 19:37 ` Petr Baudis [this message]
2006-11-14 22:09 ` Junio C Hamano
2006-11-14 15:39 ` Karl Hasselström
2006-11-14 18:55 ` Edgar Toernig
2006-11-14 21:38 ` linux
2006-11-15 7:35 ` Karl Hasselström
2006-11-15 16:50 ` Linus Torvalds
2006-11-14 22:13 ` Junio C Hamano
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=20061114193726.GG7201@pasky.or.cz \
--to=pasky@suse.cz \
--cc=git@vger.kernel.org \
--cc=jnareb@gmail.com \
--cc=kha@treskal.com \
--cc=spearce@spearce.org \
--cc=torvalds@osdl.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.