gnu-arch-users
[Top][All Lists]
Advanced

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

Re: [Gnu-arch-users] [BUG] "tla commit" vs. changes


From: Robert Widhopf-Fenk
Subject: Re: [Gnu-arch-users] [BUG] "tla commit" vs. changes
Date: Fri, 14 May 2004 23:48:52 +0200

On Friday, May 14, 2004 at 09:17:07, Tom Lord wrote:
>     > From: Miles Bader <address@hidden>
> 
>     > On Thu, May 13, 2004 at 02:51:52PM -0400, James Blackwell
>     > wrote:
>     > > > IMHO it should complain that there are no changes and
>     > > > exit(-1), what it it good for generating an empty
>     > > > patch-set.  (o.k. there is a log in the patch-set but
>     > > > nothing else ;-/)
> 
>     > > Not so. :) 
>     > > Here's two reasons: 
> 
>     > Those are easily handled with an option to force a commit even
>     > when there are no changes (ala CVS), e.g., --force.
> 
>     > I agree with the original poster, commit should by default err
>     > on the side of not committing (in general!).
> 
> It's just a rule of thumb (with definate exceptions) but I have an
> aversion to "--force" options.
> 
> Consider, for example, what they do to scripts: a script must either
> always use "--force" or test for the condition under which --force
> is needed.
> 
> If it always uses "--force" then the protections supposedly offered
> by the flag are negated.
> 
> If it tests for whether "--force" is needed, then the protections
> supposedly offered by the flag are redundent.
> 
> So this is an area in which the needs of interactive and scripting
> use are seemingly in conflict.
> 
> I live with "--force" options for things like "register-archive" or
> "my-id".  My feeling is that nearly all interactive uses _and_
> scripting uses will want to use these commands _without_
> "--force". Any resulting errors are likely to indicate a bug in the
> script or in the user's command.
> 
> But commit is different and becoming more different.  I think that
> "empty" (i.e., log-message-only) commits are not going to be that
> rare in the long run, especially as things like pqm and bug goo
> become more established.  "--force" is going to just get in the way
> of both scripting _and_ interactive use.
> 
> I myself sometimes make the "empty commit mistake" -- but only as an
> instance of a larger class of mistake.  The larger class of mistake
> is running `commit' in the wrong directory.  You'll see, for
> example, occaisional commits in "package-framework" with log
> messages that make it clear they were intended for
> "package-framework/tla" or "package-framework/hackerlab".

I am lucky, so also Tom is making this "mistake" ;c)

> The empty changeset test isn't sufficient to fix that mistake.
> Sometimes the particular wrong-directory I'm in _has_ been modified.
> 
> So, rather than a "--force" option to commit, how about:
> 
> 1) make-log should add an Archive: and Revision: header to the empty
>    log message it creates.

This would definitely help me, if those headers are showing
the archive and revision of the current tree by default,
since when writing the log I will notice that I am in the
wrong directory.

Maybe even add another informational header e.g.:
Tree-Status: Unmodified | X files modified

Bye
Robert




reply via email to

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