summaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
authorMatthieu Moy <Matthieu.Moy@imag.fr>2010-08-05 08:22:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-08-06 16:14:50 (GMT)
commit5adba90d941cdce2aa32ff5b6f562daebef8c2e4 (patch)
treee86fd01e239e620fa9169901246c15722aabd6de /revision.c
parent7d7b86f75f01cd4a491dbf0170ba36806dacb1c5 (diff)
downloadgit-5adba90d941cdce2aa32ff5b6f562daebef8c2e4.zip
git-5adba90d941cdce2aa32ff5b6f562daebef8c2e4.tar.gz
git-5adba90d941cdce2aa32ff5b6f562daebef8c2e4.tar.bz2
log: parse separate option for --glob
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/revision.c b/revision.c
index 489a3c2..f241f34 100644
--- a/revision.c
+++ b/revision.c
@@ -1484,6 +1484,8 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s
{
int i, flags, left, seen_dashdash, read_from_stdin, got_rev_arg = 0;
const char **prune_data = NULL;
+ const char *optarg;
+ int argcount;
/* First, search for "--" */
seen_dashdash = 0;
@@ -1530,10 +1532,11 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s
handle_refs(revs, flags, for_each_remote_ref);
continue;
}
- if (!prefixcmp(arg, "--glob=")) {
+ if ((argcount = parse_long_opt("glob", argv + i, &optarg))) {
struct all_refs_cb cb;
+ i += argcount - 1;
init_all_refs_cb(&cb, revs, flags);
- for_each_glob_ref(handle_one_ref, arg + 7, &cb);
+ for_each_glob_ref(handle_one_ref, optarg, &cb);
continue;
}
if (!prefixcmp(arg, "--branches=")) {