Re: [Census] So who uses git?
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- Feb 1, 2006, 03:43 UTC
- Message-ID
- <Pine.LNX.4.64.0601311938130.7301@g5.osdl.org>
- In-Reply-To
- <7v64nzollt.fsf@assigned-by-dhcp.cox.net>
On Tue, 31 Jan 2006, Junio C Hamano wrote:
Show 7 quoted lines
> > I think this should work fine as a mechanism, but I am a bit > worried about the convenience and safety aspect. It _might_ > make sense to do what RCS does; check out read-only copy by > default and set the "assume unchanged" flag, to prevent people > from accidentally modifying the working tree copy without > telling the index about it.
Yes, I think the "assume unchanged" flag goes well together with making sure that the checked-out file is non-writable at the time.
Of course, any number of editors and other actions won't care: if you do anything like
for i in *.c do sed 's/xyzzy/bas/g' < $i > $i.new mv $i.new $i done
you'll never have even noticed that the old file was marked read-only. So it's obviously not in any way any guarantee, but it probably makes sense as a crutch.
Your point that we discussed a similar flag for the "don't require a full checkout" is a good one: we should try to make sure that it works for both uses. Although maybe we decided for some reason that nobody cared about the non-checked-out case?
Linus