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

Re: What's cooking in git.git (Feb 2010, #05; Sun, 21)

From
Jeff King <peff@peff.net>
Date
Feb 22, 2010, 10:52 UTC
Message-ID
<20100222105203.GB16531@coredump.intra.peff.net>
In-Reply-To
<7vtytacebd.fsf@alter.siamese.dyndns.org>
On Sun, Feb 21, 2010 at 04:19:18PM -0800, Junio C Hamano wrote:
Show 6 quoted lines
> * cp/add-u-pathspec (2010-02-09) 2 commits
>  - test for add with non-existent pathspec
>  - git add -u: die on unmatched pathspec
> 
> I am a bit torn on this one.  Traditionally we never complained on
> unmatched pathspec when talking about tracked files.  If we were to go

True, though most of those pathspecs for tracked files are when viewing diffs. It seems more inconsistent here because "git add foo" complains but "git add -u foo" does not. So I think this one is definitely worth fixing.

Show 5 quoted lines
> this route, I think we should probably enhance the "run_diff_files" and
> friends in such a way that they mark matched pathspecs, in a way similar
> to match_pathspec() in dir.c does, and report unmatched ones based on
> that result, instead of adding an extra pass to scan the index.  The same
> goes for pathspec_matches() in builtin-grep.c

Are you proposing to check pathspecs of tracked files for typos in other places, or simply indicating an alternative implementation to fix this problem?

Either way, I think we need _something_ here. If you are volunteering to work on the alternative, fine, but otherwise (and even if it is just for a while until the other materializes), I would just as soon have the existing fix.

-Peff
PS Somewhat related, have you had a chance to read my:
  http://article.gmane.org/gmane.comp.version-control.git/140434
Previous: Jeff KingNext: Junio C Hamano
Message 11 of 13 in “What's cooking in git.git (Feb 2010, #05; Sun, 21)”
  1. Junio C HamanoFeb 22, 2010
  2. Larry D'AnnaFeb 22, 2010
  3. Johannes SixtFeb 22, 2010
  4. Junio C HamanoFeb 22, 2010
  5. Björn GustavssonFeb 22, 2010
  6. Johannes SchindelinFeb 22, 2010
  7. Thomas RastFeb 22, 2010
  8. Thomas RastFeb 22, 2010
  9. Johannes SchindelinFeb 22, 2010
  10. Jeff KingFeb 22, 2010
  11. Jeff KingFeb 22, 2010
  12. Junio C HamanoFeb 22, 2010
  13. Jeff KingFeb 23, 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.