Subject: Re: [PATCH/alternative/raw and rough] setup.c: denote repo wide pathspecs by ':'

From: Michael J Gruber <[email-masked]>
Date: Tue, 01 Mar 2011 12:49:03 +0100

Michael J Gruber venit, vidit, dixit 01.03.2011 11:21:
> Introduce a leading ':' as the notation for repo-wide pathspecs.
> 
> This is in line with our treeish:path notation which defaults to
> repowide paths.
> 
> Heck: Even ':./path' works for pathspecs, and I have no clue why!
> 
> Signed-off-by: Michael J Gruber <[email-masked]>
> ---
> I have not tested this for adverse side effects, only for the intended ones
> with "git grep".

To follow up:

Of all callers of get_pathspec() (add, checkout, clean, commit, grep,
ls-files, ls-tree, mv, rerere, reset, rm), all work perfectly, except:

ls-tree seems to be special not only in this respect.

rerere I'm too dumb to test.

Even things like

git mv :Makefile Makefile

work and mv Makefile from the root to your current work dir!

This may even provide an alternative to switching some defaults to "repo
wide".

Michael