Re: several quick questions
- From
Junio C Hamano <junkio@cox.net>
- Date
- Feb 14, 2006, 21:40 UTC
- Message-ID
- <7v7j7xr54u.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <200602142230.11442.Josef.Weidendorfer@gmx.de>
Josef Weidendorfer <Josef.Weidendorfer@gmx.de> writes:
Show 5 quoted lines
> Why not allow something like > > git-checkout master~5 > > which implicitly does create a read-only branch "seek-point"?
Now what does "git-checkout branch" mean? Does it switch to the branch, or does it force tip of seek-point to be the tip of branch and switch to seek-point branch? More interestingly, what does "git-checkout seek-point" mean?
If we _were_ to do something like cg-seek where an implicit throw-away branch is used, you at least need a way to disambiguate these cases, and "git seek" originally suggested is far clearer than what you said above.
Having said that, I am not convinced in either way, though.
> A branch could be marked readonly by above command with > > chmod a-w .git/refs/heads/seek
I do not think that would work. Have you tried it?
> And git-commit should refuse to commit on a readonly ref, telling > the user to create a writable branch before with "git-branch new".
Now, read-only ref does not interest me, but "do not commit on top of this yourself, only fast-forward from somewhere else is allowed" may be useful, for the reason why you mentioned "origin".