Re: [PATCH/alternative/raw and rough] setup.c: denote repo wide pathspecs by ':'
- From
Michael J Gruber <git@drmicha.warpmail.net>
- Date
- Mar 1, 2011, 11:49 UTC
- Message-ID
- <4D6CDD2F.5070107@drmicha.warpmail.net>
- In-Reply-To
- <bc49592f5e524a0d12aa55eeca1c5ca659b6525f.1298974647.git.git@drmicha.warpmail.net>
Michael J Gruber venit, vidit, dixit 01.03.2011 11:21:
Show 11 quoted lines
> 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 <git@drmicha.warpmail.net> > --- > 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