Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2013-07-14 12:35:35 +0400
committerJunio C Hamano <gitster@pobox.com>2013-07-15 21:56:07 +0400
commitdad2586a6b30da902d5f1979221eccc474425a7a (patch)
tree932d43dbd1cb9a3ca682a3a1df79770c1b4277ac /pathspec.h
parent8745024422d4b38d8bf93d342b7b173f57cbceaa (diff)
parse_pathspec: support prefixing original patterns
This makes 'original' suitable for passing to an external command because all pathspec magic is left in place, provided that the external command understands pathspec. The prefixing is needed because we usually launch a subcommand at worktree's top directory and the subcommand can no longer calculate the prefix itself. This slightly affects the original purpose of 'original' (i.e. reporting). We should report without prefixing. So only turn this flag on when you know you are about to pass the result straight away to an external command. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pathspec.h')
-rw-r--r--pathspec.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/pathspec.h b/pathspec.h
index 450fc03034..2e427d7f4c 100644
--- a/pathspec.h
+++ b/pathspec.h
@@ -43,6 +43,7 @@ struct pathspec {
* safer than _SLASH_CHEAP and also more expensive.
*/
#define PATHSPEC_STRIP_SUBMODULE_SLASH_EXPENSIVE (1<<5)
+#define PATHSPEC_PREFIX_ORIGIN (1<<6)
extern int init_pathspec(struct pathspec *, const char **);
extern void parse_pathspec(struct pathspec *pathspec,