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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Feb 21, 2010 at 04:19:18PM -0800, Junio C Hamano wrote:

> * 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.

> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]