monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] [PATCH] _MTN/log pre-specified magic line quickie


From: Nathaniel J. Smith
Subject: Re: [Monotone-devel] [PATCH] _MTN/log pre-specified magic line quickie
Date: Fri, 15 Dec 2006 16:10:31 -0800
User-agent: Mutt/1.2.5.1i

On Fri, Dec 15, 2006 at 08:57:36AM -0500, Ben Walton wrote:
> I actually looked at implementing this inside the hook, but chose the
> c++ route for the following reason.  I may be off base here with my
> reasoning, so let me know if you agree/disagree:
> 
> Doing this in the c++ code leaves a hook writer the responsiblity of
> explicitly removing the 'magic' line if they wish to disable the
> feature.  Implementing this in the lua hook leaves the hook writer the
> implicit resposibility of providing the feature if they override the
> hook.  Now in reality, the difference is small.  I just felt that from
> a UI perspective, it's better to make a user responsible for explicit
> rather than implicit actions.

I see your point.  I was thinking more in terms of usable apis, it's
actually really hard for a hook to programmatically detect the "magic"
line and remove it, once it is mixed in with the rest of comment.  I'm
not sure how one would actually do this (especially keeping in mind
that we may change the phrasing, the string may occur in translated
form, etc.).

I think the bottom line is that it doesn't actually matter that much,
the commit message hook stuff is a bit of a mess anyway, there are
already things like the C++ generates the message about lines with
"MTN:" in front being removed, but it's the hook that actually defines
the MTN: prefixing/removal mechanism, etc... so basically, I would
just go with whatever is easiest.

-- Nathaniel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]