From: Junio C Hamano <gitster@pobox.com>
To: "Richard Hartmann" <richih.mailinglist@gmail.com>
Cc: "Shawn O. Pearce" <spearce@spearce.org>,
"Miklos Vajna" <vmiklos@frugalware.org>,
git@vger.kernel.org
Subject: Re: commiting while the current version is in conflict
Date: Fri, 17 Oct 2008 01:37:49 -0700 [thread overview]
Message-ID: <7vwsg7mxb6.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <2d460de70810170021q5daa902er1e6e2fb6633400ec@mail.gmail.com> (Richard Hartmann's message of "Fri, 17 Oct 2008 09:21:52 +0200")
"Richard Hartmann" <richih.mailinglist@gmail.com> writes:
>> (2) pre-commit hook is a last ditch effort to help ignorant
>> users who have already done "git add" without thinking and
>> lost the "unmerged" state. It has to look at and guess at
>> the contents for that.
>
> Ignoring the ad hominem attack, I would argue that the two
Eh, Sorry about that --- I did not mean "ignorant" in that sense. Perhaps
replacing the word with "unfortunate" would sound nicer?
> To err is human, which is why rm -i exists. Else, you could
> just use alias rm='rm -rf'.
>
> Also, within certain boundaries, a tool should adapt to the
> user, not vice versa.
Don't you realize that is what the hook is doing already? After making
such an error, the definitive information is lost, because the user told
the tool that the resolution is done and the file is ready to be
committed) by mistake. Even then the hook is trying its best to help the
user.
Replace your "rm=rm -rf" sentence with "why undelete exists" and read it
again. No, filesystem undelete does not always work (disk block could
have been recycled for other files), but it could help you when you did
remove a file you wanted to keep by mistake when it can.
As to pre-add hook, I am not enthused, but if somebody sends in a clean
patch, I wouldn't be opposed to it at least in principle.
next prev parent reply other threads:[~2008-10-17 8:39 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-16 23:39 commiting while the current version is in conflict Junio Hamano
2008-10-17 7:21 ` Richard Hartmann
2008-10-17 8:37 ` Junio C Hamano [this message]
2008-10-17 9:32 ` Richard Hartmann
2008-10-17 9:16 ` Jakub Narebski
2008-10-17 9:35 ` Richard Hartmann
2008-10-17 9:36 ` Junio C Hamano
-- strict thread matches above, loose matches on Subject: below --
2008-10-16 22:10 Richard Hartmann
2008-10-16 22:48 ` Miklos Vajna
2008-10-16 23:00 ` Shawn O. Pearce
2008-10-16 23:26 ` Richard Hartmann
2008-10-17 1:16 ` Avery Pennarun
2008-10-16 23:07 ` Richard Hartmann
2008-10-16 23:23 ` Shawn O. Pearce
2008-10-16 23:31 ` Richard Hartmann
2008-10-16 23:42 ` Jakub Narebski
2008-10-17 7:25 ` Richard Hartmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vwsg7mxb6.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=richih.mailinglist@gmail.com \
--cc=spearce@spearce.org \
--cc=vmiklos@frugalware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).