From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Sitaram Chamarty <sitaramc@gmail.com>,
John Arthorne <arthorne.eclipse@gmail.com>,
git <git@vger.kernel.org>
Subject: Re: receive.denyNonNonFastForwards not denying force update
Date: Tue, 21 Aug 2012 02:31:52 -0400 [thread overview]
Message-ID: <20120821063152.GD26516@sigill.intra.peff.net> (raw)
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
next prev parent reply other threads:[~2012-08-21 6:32 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAHgXSop42qWcAEGn6=og8Pistv_Jrwhgcnv3B_ORVtSMi1fCHA@mail.gmail.com>
2012-08-20 13:33 ` receive.denyNonNonFastForwards not denying force update John Arthorne
2012-08-20 17:05 ` Junio C Hamano
2012-08-21 0:52 ` Sitaram Chamarty
2012-08-21 1:22 ` Junio C Hamano
2012-08-21 1:53 ` Brandon Casey
2012-08-21 2:16 ` Jay Soffian
2012-08-21 3:46 ` Junio C Hamano
2012-08-21 1:57 ` Jeff King
2012-08-21 3:49 ` Junio C Hamano
2012-08-21 6:10 ` Jeff King
2012-08-21 6:22 ` Jeff King
2012-08-21 6:26 ` Jeff King
2012-08-21 6:31 ` Jeff King [this message]
2012-08-21 16:50 ` Junio C Hamano
2012-08-21 19:33 ` Jeff King
2012-08-21 16:43 ` Junio C Hamano
2012-08-21 21:52 ` Junio C Hamano
2012-08-21 21:53 ` Jeff King
2012-08-21 2:08 ` Sitaram Chamarty
2012-09-10 13:24 ` John Arthorne
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120821063152.GD26516@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=arthorne.eclipse@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=sitaramc@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).