Arch hook for commit messages

Rob Browning rlb@defaultvalue.org
Tue, 15 Mar 2005 08:23:20 -0600


J=E9r=F4me 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.)

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.

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 "=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D"
    echo "WARNING: COMMIT MESSAGE TRUNCATED HERE (LIMITED TO 500 LINES)
    echo "=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D"
  else
    cat LOG
  fi

to the commit hook.

--=20
Rob Browning
rlb @defaultvalue.org and @debian.org; previously @cs.utexas.edu
GPG starting 2002-11-03 =3D 14DD 432F AE39 534D B592  F9A0 25C8 D377 8C7E 7=
3A4