git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: receive.denyNonNonFastForwards not denying force update

From
Jeff King <peff@peff.net>
Date
Aug 21, 2012, 19:33 UTC
Message-ID
<20120821193331.GA15667@sigill.intra.peff.net>
In-Reply-To
<7v1uj0fauk.fsf@alter.siamese.dyndns.org>
On Tue, Aug 21, 2012 at 09:50:27AM -0700, Junio C Hamano wrote:
Show 18 quoted lines
> > 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
Previous: Junio C HamanoNext: Junio C Hamano
Message 15 of 20 in “receive.denyNonNonFastForwards not denying force update”
  1. John ArthorneAug 20, 2012
  2. Junio C HamanoAug 20, 2012
  3. Sitaram ChamartyAug 21, 2012
  4. Junio C HamanoAug 21, 2012
  5. Brandon CaseyAug 21, 2012
  6. Jay SoffianAug 21, 2012
  7. Junio C HamanoAug 21, 2012
  8. Jeff KingAug 21, 2012
  9. Junio C HamanoAug 21, 2012
  10. Jeff KingAug 21, 2012
  11. Jeff KingAug 21, 2012
  12. Jeff KingAug 21, 2012
  13. Jeff KingAug 21, 2012
  14. Junio C HamanoAug 21, 2012
  15. Jeff KingAug 21, 2012
  16. Junio C HamanoAug 21, 2012
  17. Junio C HamanoAug 21, 2012
  18. Jeff KingAug 21, 2012
  19. Sitaram ChamartyAug 21, 2012
  20. John ArthorneSep 10, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.