From 2cd5dfd240ecb63c77bcb2532664984e3b69ae47 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Wed, 20 Feb 2008 23:28:07 -0500 Subject: Teach git-grep --name-only as synonym for -l I expected git grep --name-only to give me only the file names, much as git diff --name-only only generates filenames. Alas the option is -l, which matches common external greps but doesn't match other parts of the git UI. Signed-off-by: Shawn O. Pearce Signed-off-by: Junio C Hamano --- builtin-grep.c | 1 + 1 file changed, 1 insertion(+) (limited to 'builtin-grep.c') diff --git a/builtin-grep.c b/builtin-grep.c index 9180b39e3f..f4f4ecb11b 100644 --- a/builtin-grep.c +++ b/builtin-grep.c @@ -578,6 +578,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix) continue; } if (!strcmp("-l", arg) || + !strcmp("--name-only", arg) || !strcmp("--files-with-matches", arg)) { opt.name_only = 1; continue; -- cgit v1.2.3