From: Junio C Hamano Date: Wed, 11 May 2011 22:05:01 +0000 (-0700) Subject: Merge branch 'jc/maint-1.7.4-pathspec-stdin-and-cmdline' X-Git-Tag: v1.7.5.3~8^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8f2d4b1934f398c625019e5e696efcc3d6a875ce;p=git.git Merge branch 'jc/maint-1.7.4-pathspec-stdin-and-cmdline' Update the fix for 1.7.5 maintenance track. * jc/maint-1.7.4-pathspec-stdin-and-cmdline: setup_revisions(): take pathspec from command line and --stdin correctly --- 8f2d4b1934f398c625019e5e696efcc3d6a875ce diff --cc revision.c index 0f38364cf,073173eb9..707a703a0 --- a/revision.c +++ b/revision.c @@@ -1541,6 -1459,8 +1512,7 @@@ int setup_revisions(int argc, const cha const char *optarg; int argcount; + memset(&prune_data, 0, sizeof(prune_data)); - if (opt) submodule = opt->submodule; @@@ -1672,8 -1592,11 +1644,12 @@@ got_rev_arg = 1; } - if (prune_data) - init_pathspec(&revs->prune_data, get_pathspec(revs->prefix, prune_data)); + if (prune_data.nr) { + ALLOC_GROW(prune_data.path, prune_data.nr+1, prune_data.alloc); + prune_data.path[prune_data.nr++] = NULL; - revs->prune_data = get_pathspec(revs->prefix, prune_data.path); ++ init_pathspec(&revs->prune_data, ++ get_pathspec(revs->prefix, prune_data.path)); + } if (revs->def == NULL) revs->def = opt ? opt->def : NULL;