From: Andy Parkins <andyparkins@gmail.com>
To: git@vger.kernel.org
Subject: Re: [PATCH] Make git-commit cleverer - have it figure out whether it needs -a automatically
Date: Sun, 3 Dec 2006 09:57:02 +0000 [thread overview]
Message-ID: <200612030957.03592.andyparkins@gmail.com> (raw)
In-Reply-To: <7vbqmmzplm.fsf@assigned-by-dhcp.cox.net>
On Saturday 2006, December 02 08:09, Junio C Hamano wrote:
> Aside from the "working tree not matching index" safety valve I
> asked for, there is a more important case that "when the index
> matches HEAD" is not a safe enough check for this 'cleverness'.
As I pointed out, that safety valve made the whole thing a no-op.
> So that is _another_ exception you must handle.
>
> But I think the problem with this 'cleverer' commit runs
> deeper.
>
> Notice that you needed to say "The main idea is this cleverness,
> but foo pointed out this special case, and bar pointed out
> another, and we fixed all of these known ones and now this is
> good, let's apply it." in your proposed commit log message? You
> should smell fishiness in that kind of reasoning.
I don't believe so. In deep parts of a program cleverness is always a bad
idea. It just obfuscates functionality. However, this "cleverness" is about
making things easier for a human. Humans have a notoriously illogical set of
requirements for doing the right thing. As an example I'd hold up git's
clever date specification code; a computer would be perfectly happy to accept
epoch time, but instead humans like to be able to say "three weeks ago this
Thursday at five to four".
This patch is merely to make git-commit do something sensible when it would
normally do nothing. I was sure there would be more exceptions to when it
should activate; as git-commit is already a mess of "useful" extra switches.
To blame this patch for the fact that git-commit does a lot of things in
slightly different ways hardly seems fair.
As usual though: I don't mind, I'm not some huge proponent of this
functionality - /I/ get along fine with git-commit
> I really think the users would be much better off with
> consistent behaviour that is easy and simple to describe than a
> complex magic that does the right thing 99.9% of the time,
> because you either understand the complex magic or constantly in
> fear of the tool that can work against you 0.01% of the time.
I suspect that this patch is the least of git-commit's problems in that
department. "Easy to describe" is certainly not the case already, otherwise
none of this discussion (or patch) would ever have started.
Andy
--
Dr Andrew Parkins, M Eng (Hons), AMIEE
next prev parent reply other threads:[~2006-12-03 10:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-01 11:06 [PATCH] Make git-commit cleverer - have it figure out whether it needs -a automatically Andy Parkins
2006-12-01 11:15 ` Junio C Hamano
2006-12-01 11:32 ` Junio C Hamano
2006-12-01 12:33 ` Andy Parkins
2006-12-02 8:09 ` Junio C Hamano
2006-12-02 9:45 ` Carl Worth
2006-12-03 9:57 ` Andy Parkins [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-11-30 13:13 [PATCH/RFC] " Jakub Narebski
2006-11-30 13:24 ` [PATCH] " Andy Parkins
2006-11-30 13:32 ` Nguyen Thai Ngoc Duy
2006-11-30 13:41 ` Jakub Narebski
2006-11-30 15:01 ` Andy Parkins
2006-11-30 15:43 ` Salikh Zakirov
2006-11-30 16:28 ` Jakub Narebski
2006-12-01 10:59 ` Andy Parkins
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=200612030957.03592.andyparkins@gmail.com \
--to=andyparkins@gmail.com \
--cc=git@vger.kernel.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).