Re: several quick questions
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Feb 14, 2006, 20:54 UTC
- Message-ID
- <Pine.LNX.4.63.0602142150140.23719@wbgn013.biozentrum.uni-wuerzburg.de>
- In-Reply-To
- <7vmzgtr7u2.fsf@assigned-by-dhcp.cox.net>
Hi,
On Tue, 14 Feb 2006, Junio C Hamano wrote:
Show 20 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes: > > > Hi, > > > > On Tue, 14 Feb 2006, Petr Baudis wrote: > > > >> [...] > >> > >> It works by creating a new branch cg-seek-point and storing the seeked > >> point there; if HEAD is already on the branch, it merely changes the > >> seek point and resets the working tree appropriately. cg-seek without > >> any arguments will then return to your original head, whose name was > >> stored in .git/head-name. > > > > And if you want to prevent accidental commit, just "chmod a-w > > $GIT_DIR/index". > > That is a wrong answer. It is perfectly sane to modify index > without an intention to commit that change (you can always say > "git reset").
Okay, I was not being completely truthful. If I did not get the original idea of git-seek wrong, then it was kind of an excursion, just taking a peek. And if you want to return from that excursion, I thought maybe it would make sense to disallow index operations *at all* until returning to the HEAD.
But I agree it is nasty. And Linus mentioned that the benefits of being able to commit into a temporary branch outweigh the shortcoming easily. (The shortcoming being that you have to keep in mind that you are in another branch. Which does not come easily to a fresh CVS convert.)
Ciao, Dscho