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

Bug (or inconsistency) in git add

From
SBSteve Bennett <stevage@gmail.com>
Date
Apr 30, 2012, 04:03 UTC
Message-ID
<CADJEhEVNPj_FrRatjD7Jmbd7i_FYg9BzNNP48_4VAr6fgqBT8Q@mail.gmail.com>
In-Reply-To
<CADJEhEWC=mMManxi9Q6W9EvVKmTV=i1ZxbdW4QS_ou_DrBEb+Q@mail.gmail.com>
I couldn't find a bug tracker for Git, so here's my bug report.

Given a directory containing foo/bar/baz/blah.py and foo/bar/baz/blem.py, this command: 1) git add foo/**/*.py

produces no output, and adds no files.

This command: 2) git add /**.py

produces no output but adds all the files.

This command: 3) git add foo/**.py

produces an error and adds no files.

IMHO, "git add" should always produce an error message if no files matched the pathspec given. So case 1) should produce an error message.

git version 1.7.9.4 on Snow Leopard. (There doesn't seem to be a 1.7.10 at http://code.google.com/p/git-osx-installer/downloads/list?can=3)

If this is some weird bash shell behaviour, my apologies.
Steve
Next: Steve Bennett
Message 1 of 3 in “Bug (or inconsistency) in git add”
  1. Steve BennettApr 30, 2012
  2. Steve BennettApr 30, 2012
  3. Junio C HamanoApr 30, 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.