Re: Missing features in git

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Tue, 14 Nov 2006, Shawn Pearce wrote:

> Jakub Narebski <jnareb@xxxxxxxxx> 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.

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.

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.

Junio, what do you think? It wouldn't even be backwards incompatible, 
because we're strictly allowing a superset of what we used to..

			Linus

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]