From: Junio C Hamano Date: Sun, 22 Aug 2010 06:28:31 +0000 (-0700) Subject: Merge branch 'mm/shortopt-detached' X-Git-Tag: v1.7.3-rc0~49 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e40b34b1ec2c91aaed5572116cd8d01afff7851f;p=git.git Merge branch 'mm/shortopt-detached' * mm/shortopt-detached: log: parse separate option for --glob log: parse separate options like git log --grep foo diff: parse separate options --stat-width n, --stat-name-width n diff: split off a function for --stat-* option parsing diff: parse separate options like -S foo Conflicts: revision.c --- e40b34b1ec2c91aaed5572116cd8d01afff7851f diff --cc revision.c index 5f2cf1e84,f241f341c..b1c18906b --- a/revision.c +++ b/revision.c @@@ -1466,11 -1484,9 +1484,13 @@@ int setup_revisions(int argc, const cha { int i, flags, left, seen_dashdash, read_from_stdin, got_rev_arg = 0; const char **prune_data = NULL; + const char *submodule = NULL; + const char *optarg; + int argcount; + if (opt) + submodule = opt->submodule; + /* First, search for "--" */ seen_dashdash = 0; for (i = 1; i < argc; i++) { @@@ -1513,13 -1529,14 +1533,14 @@@ continue; } if (!strcmp(arg, "--remotes")) { - handle_refs(revs, flags, for_each_remote_ref); + handle_refs(submodule, revs, flags, for_each_remote_ref_submodule); 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=")) {