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

Re: Gitignore matching "git add" wildcard prevents operation

From
NSNicolas Sebrecht <nicolas.s.dev@gmx.fr>
Date
Jan 15, 2010, 16:11 UTC
Message-ID
<20100115161107.GC12982@vidovic>
In-Reply-To
<20100115154816.GA1579@coredump.intra.peff.net>
The 15/01/10, Jeff King wrote:
Show 20 quoted lines
> On Fri, Jan 15, 2010 at 04:34:19PM +0100, Nicolas Sebrecht wrote:
> 
> > >   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.
> > 
> > Not sure. This isn't a Git-particular issue.
> > 
> > Users may hit this with a lot of other unix tools (sed, grep, find,
> > etc). So, we can expect either
> >   they already know the issue;
> > or
> >   they are discovering it using Git.
> 
> I don't understand what you mean. How does "sed" do its own globbing of
> the command line?

Well, we are in the same dilemma as the other tools. The internal globbing rules are explained in the related man page.

Show 5 quoted lines
> > Most of the tools I talk about do have a manual section about globbing.
> > Users could learn globs with Git too and expect the same behaviour
> > somewhere else.
> 
> Sure. git-add(1) talks about globbing, too
Oops, I was missing that; thanks.
> My complaint was more that as a user, I am not likely to see this
> problem and think "I'll bet git-specific globbing can solve it."

Yes. My point is that we are not talking about a Git specific issue. What you're raising here is true whatever the command is. So, as long as we clearly explain how 'git add' works, we are fine. Don't we?

>                                                                  And
> when I look in the manual, I am more likely to look for a command-line
> option that helps me rather than to read all of the text

True. All I can see is to improve the man page with a dedicated section "Globbing" instead of loosing it in a "random" place.

-- 
Nicolas Sebrecht
Previous: Jeff KingNext: Jeff King
Message 7 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.