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
path: root/grep.h
diff options
context:
space:
mode:
authorClemens Buchacher <drizzd@aon.at>2009-09-05 16:31:17 +0400
committerJunio C Hamano <gitster@pobox.com>2009-09-08 02:03:04 +0400
commit493b7a08d80535def6756b281873e4e0937ba6c2 (patch)
tree43d63705e1e0e3951e7c3acc61a89e2c96bcf518 /grep.h
parent929e37d3dfef13895ef6e4b54c7d45962b234461 (diff)
grep: accept relative paths outside current working directory
"git grep" would barf at relative paths pointing outside the current working directory (or subdirectories thereof). Use quote_path_relative(), which can handle such cases just fine. [jc: added tests.] Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'grep.h')
-rw-r--r--grep.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/grep.h b/grep.h
index a67005de62..5b767c931c 100644
--- a/grep.h
+++ b/grep.h
@@ -59,6 +59,7 @@ struct grep_opt {
struct grep_pat *pattern_list;
struct grep_pat **pattern_tail;
struct grep_expr *pattern_expression;
+ const char *prefix;
int prefix_length;
regex_t regexp;
unsigned linenum:1;