Re: [PATCH 2/2] read-tree: at least one tree-ish argument is required
- From
Sverre Rabbelier <srabbelier@gmail.com>
- Date
- Dec 18, 2009, 20:21 UTC
- Message-ID
- <fabb9a1e0912181221i31c32a76n50581adfb2185037@mail.gmail.com>
- In-Reply-To
- <7vy6l0ujkx.fsf@alter.siamese.dyndns.org>
Heya,
On Fri, Dec 18, 2009 at 14:13, Junio C Hamano <gitster@pobox.com> wrote:
> Sounds like "commit.confirm = xxx" configuration patches are coming?
Not a bad idea.
> What > other questionable operations we might want to let users configure git to > ask for confirmation?
I don't see any other of the above category, that is, the category of operations that contain 'git commit -a' with a non-empty index, and 'git rm' on a modified file (which we already prevent). But see below.
> I somehow suspect that you haven't had your morning coffee yet ;-) > Aren't we talking about the index, and why are you bringing up the reflog?
It was a topic hijack of sorts, we were talking about data loss. I brought up the reflog since I think that was mentioned before when we discussed ways to prevent data loss (e.g., create a commit of the current state when doing 'git reset --hard' and record it in such a reflog).
> More importantly, if you accept that there are non-interrogator commands > in the git command set, I somehow suspect that you will soon realize that > "git config core.nodataloss true" is equivalent to "chmod a-w -R .".
I don't think that's quite right, since you don't lose any data if you do only additive commands (e.g., create new commits, etc).
> might be useful mode of non-operation (read-only historical archive) but I > do not think it deserves a configuration of its own with checks in the > code all over the place that might possibly change any states of the > repository.
That is not quite what I intended with 'core.preventdataloss' (which I agree is a bad name for what I intend with it). I meant for a configuration option which insures that all non-interrogation commands make sure that what they throw away is recoverable (for example through the reflog).
> "git config user.novice true" to increase the verbosity and degree of > hand-holding is an entirely different matter, but if that is what you are > advocating, you shouldn't call it "core.nodataloss".
I'm not sure I'd call it "user.novice", since I don't consider myself a novice user, and I would definitely like to be able to recover data that I accidentally deleted with 'git reset --hard'.
-- Cheers, Sverre Rabbelier