author | Junio C Hamano <gitster@pobox.com> | |
Wed, 11 May 2011 22:05:01 +0000 (15:05 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 11 May 2011 23:09:25 +0000 (16:09 -0700) |
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
* jc/maint-1.7.4-pathspec-stdin-and-cmdline:
setup_revisions(): take pathspec from command line and --stdin correctly
1 | 2 | |||
---|---|---|---|---|
revision.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc revision.c
index 0f38364cf3f81a9088305ca802adf8b7c9260e91,073173eb9c48ec08a8fb30adf6bbd8b6ce54b1cc..707a703a09d6c7ffc1adfcd89da83d5b97da397f
--- 1/revision.c
--- 2/revision.c
+++ b/revision.c
const char *optarg;
int argcount;
-
+ memset(&prune_data, 0, sizeof(prune_data));
if (opt)
submodule = opt->submodule;
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;