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

Re: Gitignore matching "git add" wildcard prevents operation

From
Jeff King <peff@peff.net>
Date
Jan 14, 2010, 20:39 UTC
Message-ID
<20100114203928.GA26883@coredump.intra.peff.net>
In-Reply-To
<7vljg0bfox.fsf@alter.siamese.dyndns.org>
On Thu, Jan 14, 2010 at 12:21:34PM -0800, Junio C Hamano wrote:
Show 11 quoted lines
> Jeff King <peff@peff.net> writes:
> 
> > ... But there is no way to
> > use the shell wildcard and get the behavior you want (not even a "git
> > add --really-ignore-my-ignores a.*").
> 
> Perhaps you want to run
> 
> 	$ git add 'a.*'
> 
> Notice that the wildcard is protected from the shell.

Ugh. You're right that it does work, but I don't expect users to make the intuitive jump from the OP's problem to this solution (I certainly didn't). In particular:

  1. Most programs don't take their own globs. Without knowing that git
     can do so, there is no reason to discover it in this instance. I
     can see searching the manpage for options, but not for a discussion
     of globbing behavior.
  2. They would have to know that using a git-glob will magically change
     the error-checking behavior.
-Peff
Previous: Junio C HamanoNext: Nicolas Sebrecht
Message 4 of 12 in “Gitignore matching "git add" wildcard prevents operation”
  1. Marko PoutiainenJan 14, 2010
  2. Jeff KingJan 14, 2010
  3. Junio C HamanoJan 14, 2010
  4. Jeff KingJan 14, 2010
  5. Nicolas SebrechtJan 15, 2010
  6. Jeff KingJan 15, 2010
  7. Nicolas SebrechtJan 15, 2010
  8. Jeff KingJan 15, 2010
  9. Nicolas SebrechtJan 15, 2010
  10. Junio C HamanoJan 15, 2010
  11. Marko PoutiainenJan 14, 2010
  12. Nicolas SebrechtJan 15, 2010

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.