Arch hook for commit messages
Jérôme Marant
jerome.marant@free.fr
Tue, 15 Mar 2005 15:47:51 +0100
Quoting Rob Browning <rlb@defaultvalue.org>:
> Jérôme Marant <jerome.marant@free.fr> writes:
>
> > We have always done so with SVN. I don't understand why you suddenly
> > have concerns. Commit messages are meant to warn about what changed
> > which is more practical than using the tool itself for this.
>
> I'm not concerned about having the full diffs most of the time, and I
> agree that it's fairly convenient to have the entire diff in the mail
> when it isn't overwhelming (which has been the case so far).
>
> However, the reason I was thinking about the issue is that I've been
> working with some of my other packages where, for example, the commit
> message might easily be over 20MB when a new arch is added
> (i.e. stalin). (I'm assuming that cat-archive-log includes new files
> in the diff. If not, then this wouldn't apply.)
I do discriminate w.r.t. to category, as you can seen in the hook,
so you can easily tweek it.
> Even with emacs, the autofiles.dpatch is over 700K (though the diffs
> may be small after the initial submission), and if we were to ever
> store the upstream source in baz, importing a new upstream version
> would generate extremely large commit emails.
700K? How can it be that big?
> So that's why I started wondering if we might want to consider adding
> something like this:
>
> if test `wc -l LOG` -gt 1000
> then
> head -1000 LOG
> echo
> echo "======================
========================================"
> echo "WARNING: COMMIT MESSAGE TRUNCATED HERE (LIMITED TO 500 LINES)
> echo "======================
========================================"
> else
> cat LOG
> fi
>
> to the commit hook.
Yes, why not.
--
Jérôme Marant