[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-patch] Broken patch commit: don't warn twice about the same inv
From: |
Andreas Gruenbacher |
Subject: |
Re: [bug-patch] Broken patch commit: don't warn twice about the same invalid file name |
Date: |
Fri, 6 Apr 2012 18:02:46 +0200 |
User-agent: |
KMail/1.12.4 (Linux/2.6.36-rc7+; KDE/4.3.5; i686; ; ) |
Jim,
On Friday 06 April 2012 15:25:30 Jim Meyering wrote:
> +static void
> +add_bad (char *bad[], char const *name)
> +{
> + char **p = &bad[!! bad[0]];
we remember the first and last bad name here, not all the bad names of the
last patch (bad[0] is never cleared), so that's a bug.
I don't see the benefit of remembering all names; patches that modify the same
file more than once are pretty rare. So this approach doesn't look better
than the alternative to me. Thanks for offering that solution though!
> + say ("Ignoring potentially dangerous file name %s\n", quotearg (name));
> + free (*p);
> + *p = xstrdup (name);
> +}
Andreas
Re: [bug-patch] Broken patch commit: don't warn twice about the same invalid file name, Jim Meyering, 2012/04/06
Re: [bug-patch] Broken patch commit: don't warn twice about the same invalid file name, Jean Delvare, 2012/04/10