Re: receive.denyNonNonFastForwards not denying force update
- From
Jeff King <peff@peff.net>
- Date
- Aug 21, 2012, 06:31 UTC
- Message-ID
- <20120821063152.GD26516@sigill.intra.peff.net>
- In-Reply-To
- <20120821062219.GB26516@sigill.intra.peff.net>
On Tue, Aug 21, 2012 at 02:22:19AM -0400, Jeff King wrote:
> And this might be a good follow-on: > > -- >8 -- > Subject: [PATCH] gitignore: report access errors of exclude files
And if we are going to do that, then we almost certainly want to do this.
-- >8 -- Subject: [PATCH] attr: warn on inaccessible attribute files
Just like config and gitignore files, we silently ignore missing or inaccessible attribute files. An existent but inaccessible file is probably a configuration error, so let's warn the user.
Signed-off-by: Jeff King <peff@peff.net> --- attr.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/attr.c b/attr.c index b52efb5..cab01b8 100644 --- a/attr.c +++ b/attr.c @@ -352,8 +352,11 @@ static struct attr_stack *read_attr_from_file(const char *path, int macro_ok) char buf[2048]; int lineno = 0; - if (!fp) + if (!fp) { + if (errno != ENOENT) + warning(_("unable to access '%s': %s"), path, strerror(errno)); return NULL; + } res = xcalloc(1, sizeof(*res)); while (fgets(buf, sizeof(buf), fp)) handle_attr_line(res, buf, path, ++lineno, macro_ok);
-- 1.7.12.4.g4e9f38f