Junio C Hamano
8a42c98501
magic pathspec: add tentative ":/path/from/top/level" pathspec support
...
Support ":/" magic string that can be prefixed to a pathspec element to
say "this names the path from the top-level of the working tree", when
you are in the subdirectory.
For example, you should be able to say:
$ edit Makefile ;# top-level
$ cd Documentation
$ edit git.txt ;# in the subdirectory
and then do one of three things, still inside the subdirectory:
$ git add -u . ;# add only Documentation/git.txt
$ git add -u :/ ;# add everything, including paths outside Documentation
$ git add -u ;# whatever the default setting is.
To truly support magic pathspec, the API needs to be restructured so that
get_pathspec() and init_pathspec() are unified into one call. Currently,
the former just prefixes the user supplied pathspec with the current
subdirectory path, and the latter takes the output from the former and
pre-parses them into a bit richer structure for easier handling. They
should become a single API function that takes the current subdirectory
path and the remainder of argv[] (after parsing --options and revision
arguments from the command line) and returns an array of parsed pathspec
elements, and "magic" should become attributes of struct pathspec_item.
This patch implements only "top" magic because it can be hacked into the
system without such a refactoring.
The syntax for magic pathspec prefix is designed to be extensible yet
simple to type to invoke a simple magic like "from the top". The parser
for the magic prefix is hooked into get_pathspec() function in this patch,
and it needs to be moved when we refactor the API.
But we have to start from somewhere.
Signed-off-by: Junio C Hamano <gitster@pobox.com >
2011-04-06 17:08:46 -07:00
..
2011-02-09 14:03:51 -08:00
2011-03-16 17:02:58 -07:00
2011-01-04 11:23:42 -08:00
2010-09-03 09:43:42 -07:00
2010-05-07 09:34:59 -07:00
2011-02-15 11:53:00 -08:00
2011-03-16 16:47:26 -07:00
2011-03-08 14:44:07 -08:00
2010-12-10 13:52:05 -08:00
2010-08-20 10:53:56 -07:00
2010-11-03 09:19:10 -07:00
2011-02-07 15:19:09 -08:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2010-08-20 14:16:51 -07:00
2011-03-19 23:21:10 -07:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2010-10-13 19:10:55 -07:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-19 23:24:27 -07:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-09 12:22:15 -08:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2010-03-30 16:49:19 -07:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-19 23:25:32 -07:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-19 23:24:27 -07:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2010-11-17 13:23:55 -08:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-15 13:32:09 -07:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-02-17 11:49:54 -08:00
2011-01-04 11:23:42 -08:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-19 23:24:48 -07:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-12 22:00:38 -05:00
2011-03-18 09:58:47 -07:00
2011-03-11 10:59:16 -05:00
2010-10-13 19:10:55 -07:00
2010-08-31 14:28:20 -07:00
2011-01-10 09:09:02 -08:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2010-07-20 16:59:17 -07:00
2010-07-05 13:39:02 -07:00
2010-11-03 09:18:58 -07:00
2010-11-03 09:19:08 -07:00
2011-04-06 17:08:46 -07:00
2010-09-09 16:17:59 -07:00
2010-11-24 15:13:58 -08:00
2011-02-28 12:42:38 -08:00
2011-02-21 10:24:08 -08:00
2010-10-26 21:54:04 -07:00
2010-06-16 14:45:09 -07:00
2010-10-08 12:31:07 -07:00
2011-03-09 15:15:52 -08:00
2011-02-21 22:58:02 -08:00
2011-03-08 21:35:22 -08:00
2010-07-20 16:59:17 -07:00
2010-11-03 09:20:48 -07:00