[PATCH] Implement --strict flag for commit

David Allouche david at allouche.net
Tue Oct 18 10:55:38 BST 2005


On Mon, 2005-10-17 at 20:07 -0400, Aaron Bentley wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> John Arbash Meinel wrote:
> > Perhaps as a per-branch setting?
> 
> I worry that this would lead to unnecessary acrimony, because it would
> be a way for people to control other peoples' settings.  Consider the
> arguments over modelines in the baz source.  I also find it quite
> confusing when rules apply only in certain branches.  So I would prefer
> a global option.

Agreed on that point. Policy should be defined per-user, not per-branch.

Here's a little thought experiment to make the point. Say you have two
value for a policy: "strict" and "loose", where anything valid in
"strict" is also valid is "loose", but not conversely. Also say you have
a branch maintainer and separate branch contributors who may have
different preferences for this policy, with reasons ranging from
personal taste to tool-chain support.

You get a little matrix:

                   | Maintainer Strict | Maintainer Loose
-------------------+-------------------+------------------
Contributor Strict | Consensus         | A
-------------------+-------------------+------------------
Contributor Loose  | B                 | Consensus


Cases A and B are conflictual if the settings are defined in the branch,
as any setting will make somebody unhappy, and merging will cause
trouble.

If the settings are defined as a user preference, things pan out
differently:

Case A: The Contributor will always submit changes that are valid to the
Maintainer, since the Contributor is stricter than the Maintainer.
Social peace ensues.

Case B: The Contributor may submit changes that are invalid to the
Maintainer. The problem will be reported using the same channel as code
review, and in my opinion it's essentially the same sort of problem.

I think this thought experiment tells us two things:

      * Policy enforcement in the tool-chain must have defaults set by
        the user, not by the Maintainer.

      * The tool-chain should support diagnostic tools exercising the
        strict policy, so automated quality insurance (e.g. test suite)
        can easily spot violations at the time most convenient to the
        user.
-- 
                                                            -- ddaa
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051018/d19268ed/attachment.pgp 


More information about the bazaar mailing list