aboutsummaryrefslogtreecommitdiffstats
path: root/build-aux/git-hooks/pre-commit
diff options
context:
space:
mode:
authorPaul Eggert2015-04-07 00:00:55 -0700
committerPaul Eggert2015-04-07 00:00:55 -0700
commit23468561682aea0705249a469f614bb873e4f411 (patch)
tree0f9627efff11eaec69cbe91a730ccfdda2f1396e /build-aux/git-hooks/pre-commit
parentdd1404cca3cf6bc459bc53f9aa9528170e30efd4 (diff)
downloademacs-23468561682aea0705249a469f614bb873e4f411.tar.gz
emacs-23468561682aea0705249a469f614bb873e4f411.zip
Generate a ChangeLog file from commit logs
* .gitignore: Add 'ChangeLog'. * build-aux/gitlog-to-changelog: New file, from Gnulib. * build-aux/gitlog-to-emacslog: New file. * CONTRIBUTE: Document the revised workflow. * Makefile.in (clean): Remove *.tmp and etc/*.tmp* instead of just special cases. (CHANGELOG_HISTORY_INDEX_MAX, CHANGELOG_N, gen_origin): New vars. (ChangeLog, unchanged-history-files, change-history) (change-history-commit): New rules. * admin/admin.el (make-manuals-dist--1): Don't worry about doc/ChangeLog. * admin/authors.el: Add a FIXME. * admin/make-tarball.txt: * lisp/calendar/icalendar.el: * lisp/gnus/deuglify.el: * lisp/obsolete/gulp.el: * lwlib/README: Adjust to renamed ChangeLog history files. * admin/merge-gnulib (GNULIB_MODULES): Add gitlog-to-changelog. * admin/notes/repo: Call it 'master' a la Git, not 'trunk' a la Bzr. Remove obsolete discussion of merging ChangeLog files. New section "Maintaining ChangeLog history". * build-aux/git-hooks/pre-commit: Reject attempts to commit files named 'ChangeLog'. * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate. * make-dist: Make and distribute top-level ChangeLog if there's a .git directory. Distribute the new ChangeLog history files instead of scattered ChangeLog files. Distribute the new files gitlog-to-changelog and gitlog-to-emacslog. Fixes: bug#19113
Diffstat (limited to 'build-aux/git-hooks/pre-commit')
-rwxr-xr-xbuild-aux/git-hooks/pre-commit18
1 files changed, 10 insertions, 8 deletions
diff --git a/build-aux/git-hooks/pre-commit b/build-aux/git-hooks/pre-commit
index d050c40a2e6..8bce1f5ade0 100755
--- a/build-aux/git-hooks/pre-commit
+++ b/build-aux/git-hooks/pre-commit
@@ -34,13 +34,15 @@ if test "$nbadchars" -ne 0; then
34 exit 1 34 exit 1
35fi 35fi
36 36
37new_names=`$git_diff HEAD` || exit 37for new_name in `$git_diff HEAD`; do
38case " 38 case $new_name in
39$new_names" in 39 -* | */-*)
40 */-* | *' 40 echo "$new_name: File name component begins with '-'."
41'-*) 41 exit 1;;
42 echo "File name component begins with '-'." 42 ChangeLog | */ChangeLog)
43 exit 1;; 43 echo "$new_name: Please use git commit messages, not ChangeLog files."
44esac 44 exit 1;;
45 esac
46done
45 47
46exec git diff-index --check --cached HEAD -- 48exec git diff-index --check --cached HEAD --