On 23/11/15 07:06, Bernhard Voelker wrote: > On 11/22/2015 11:06 PM, Pádraig Brady wrote: >> From f664e7e87b979503f263334caa02cc0525b77c43 Mon Sep 17 00:00:00 2001 >> From: Luther Thompson <[email protected]> >> Date: Sun, 22 Nov 2015 21:47:59 +0000 >> Subject: [PATCH] md5sum, sha*sum: add --ignore-missing for checking a subset >> of files > > This requires 'git commit --no-verify'. I thought we already have an allowed > word for the "md5sum, sha*sum" family, but obviously we don't. > If we add such a keyword one day - which is not easy as "*sum" would also > match the 'cksum' and the 'sum' utilities, too - it'd be good to ensure that > each of the afftected utils is mentioned explicitly in the lines following > (or in the NEWS as you did here).
Good point, though it's probably overkill to verify the expansion is mentioned elsewhere in the commit. I'll add the following: Author: Pádraig Brady <[email protected]> Date: Mon Nov 23 11:10:31 2015 +0000 maint: allow 'sha*sum:' tag in commit summaries To support "md5sum,sha*sum:" Suggested by Bernhard Voelker. diff --git a/scripts/git-hooks/commit-msg b/scripts/git-hooks/commit-msg index 8e79b6c..d860f0b 100755 --- a/scripts/git-hooks/commit-msg +++ b/scripts/git-hooks/commit-msg @@ -24,7 +24,7 @@ my @valid = qw( sum sync tac tail tee test timeout touch tr true truncate tsort tty uname unexpand uniq unlink uptime users vdir wc who whoami yes - all copy gnulib tests maint doc build scripts + all copy gnulib tests maint doc build scripts sha\*sum ); my $v_or = join '|', @valid; my $valid_regex = qr/^(?:$v_or)$/; > While the above 4 changes in the big 'else' block are correct, I think it'd > be easier and clearer to handle the case explicitly in one place, like: > > @@ -610,6 +622,10 @@ digest_check (const char *checkfile_name) > printf (": %s\n", _("FAILED open or read")); > } > } > + else if (ignore_missing && ! *bin_buffer) > + { > + ; /* Ignore actually missing file. */ > + } Yes much better hoisted there. I was mulling over outputting _("MISSING") in some cases, but then decided against. So therefore this check is best separated. I'll push a bit later today. thanks! Pádraig.
