git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 15:33:31 -0400	[thread overview]
Message-ID: <20120821193331.GA15667@sigill.intra.peff.net> (raw)
In-Reply-To: <7v1uj0fauk.fsf@alter.siamese.dyndns.org>

On Tue, Aug 21, 2012 at 09:50:27AM -0700, Junio C Hamano wrote:

> > Subject: [PATCH] gitignore: report access errors of exclude files
> >
> > When we try to access gitignore files, we check for their
> > existence with a call to "access". We silently ignore
> > missing files. However, if a file is not readable, this may
> > be a configuration error; let's warn the user.
> >
> > For $GIT_DIR/info/excludes or core.excludesfile, we can just
> > use access_or_warn. However, for per-directory files we
> > actually try to open them, so we must add a custom warning.
> 
> There are a couple of users of add_excludes_from_file() that is
> outside the per-directory walking in ls-files and unpack-trees; I
> think both are OK with this change, but the one in ls-files may want
> to issue a warning or even an error upon ENOENT.
> 
> Not a regression with this patch; just something we may want to do
> while we are in the vicinity.

The two I see are:

  1. unpack-trees:verify_absent

     This looks like it is reading info/sparse-checkout. But I think it
     is OK for that file to be missing, no?

  2. ls-files:option_parse_exclude_from

      This handles --exclude-from. I would expect most callers to be
      converted to --exclude-standard these days, but originally callers
      did something like:

        git ls-files \
          --exclude-from=$GIT_DIR/info/exclude \
          --exclude-per-directory=.gitignore \
          ...

       While it would be friendlier to a user calling ls-files to warn
       about a missing entry in the first case (since they explicitly
       typed it, they presumably expect it to work). But for a script
       calling the ls-files plumbing, that --exclude-from has always
       meant "if it's there, use it, but otherwise, don't worry".

       Probably no such callers exist anymore, but complaining would be
       a regression for them.

-Peff

  reply	other threads:[~2012-08-21 19:33 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
2012-08-21 16:50                 ` Junio C Hamano
2012-08-21 19:33                   ` Jeff King [this message]
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=20120821193331.GA15667@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).