[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [coreutils] [PATCH] md5sum: Add option to ignore non-existant files
From: |
Pádraig Brady |
Subject: |
Re: [coreutils] [PATCH] md5sum: Add option to ignore non-existant files |
Date: |
Mon, 23 Nov 2015 11:25:18 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
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 <address@hidden>
>> 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 <address@hidden>
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.
- Re: [coreutils] [PATCH] md5sum: Add option to ignore non-existant files, Pádraig Brady, 2015/11/01
- Re: [coreutils] [PATCH] md5sum: Add option to ignore non-existant files, Pádraig Brady, 2015/11/22
- Re: [coreutils] [PATCH] md5sum: Add option to ignore non-existant files, Bernhard Voelker, 2015/11/23
- Re: [coreutils] [PATCH] md5sum: Add option to ignore non-existant files,
Pádraig Brady <=
- Re: [coreutils] [PATCH] md5sum: Add option to ignore non-existant files, Pádraig Brady, 2015/11/23
- Re: [coreutils] [PATCH] md5sum: Add option to ignore non-existant files, Jim Meyering, 2015/11/23
- Re: [coreutils] [PATCH] md5sum: Add option to ignore non-existant files, Pádraig Brady, 2015/11/23
- Re: [coreutils] [PATCH] md5sum: Add option to ignore non-existant files, Jim Meyering, 2015/11/23
- Re: bug#15604: [coreutils] [PATCH] md5sum: Add option to ignore non-existant files, Pádraig Brady, 2015/11/23
- Re: bug#15604: [coreutils] [PATCH] md5sum: Add option to ignore non-existant files, Jim Meyering, 2015/11/23