[RFC PATCH 2/2] Allow "git log -S string" as synonym for "git log -Sstring".
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
diff.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/diff.c b/diff.c
index 17873f3..4e3be89 100644
--- a/diff.c
+++ b/diff.c
@@ -2993,6 +2993,7 @@ static int diff_scoreopt_parse(const char *opt);
int diff_opt_parse(struct diff_options *options, const char **av, int ac)
{
const char *arg = av[0];
+ const char *optarg = av[1];
/* Output format options */
if (!strcmp(arg, "-p") || !strcmp(arg, "-u") || !strcmp(arg, "--patch"))
@@ -3182,6 +3183,10 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
options->line_termination = 0;
else if (!prefixcmp(arg, "-l"))
options->rename_limit = strtoul(arg+2, NULL, 10);
+ else if (!strcmp(arg, "-S")) {
+ options->pickaxe = optarg;
+ return 2;
+ }
else if (!prefixcmp(arg, "-S"))
options->pickaxe = arg + 2;
else if (!strcmp(arg, "--pickaxe-all"))
--
1.7.2.23.g58c3b.dirty