From: Junio C Hamano Date: Tue, 24 Nov 2009 06:30:08 +0000 (-0800) Subject: Merge branch 'jc/log-stdin' X-Git-Tag: v1.6.6-rc1~38 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e61f25f3a6bb5dcbb5ae5f8b4ad26c308982373c;p=git.git Merge branch 'jc/log-stdin' * jc/log-stdin: Add trivial tests for --stdin option to log family Make --stdin option to "log" family read also pathspecs setup_revisions(): do not call get_pathspec() too early Teach --stdin option to "log" family read_revision_from_stdin(): use strbuf Conflicts: revision.c --- e61f25f3a6bb5dcbb5ae5f8b4ad26c308982373c diff --cc revision.c index a36c0d9bc,8750c20e0..a8a3c3a4b --- a/revision.c +++ b/revision.c @@@ -1219,16 -1256,34 +1257,44 @@@ void parse_revision_opt(struct rev_inf ctx->argc -= n; } +static int for_each_bad_bisect_ref(each_ref_fn fn, void *cb_data) +{ + return for_each_ref_in("refs/bisect/bad", fn, cb_data); +} + +static int for_each_good_bisect_ref(each_ref_fn fn, void *cb_data) +{ + return for_each_ref_in("refs/bisect/good", fn, cb_data); +} + + static void append_prune_data(const char ***prune_data, const char **av) + { + const char **prune = *prune_data; + int prune_nr; + int prune_alloc; + + if (!prune) { + *prune_data = av; + return; + } + + /* count existing ones */ + for (prune_nr = 0; prune[prune_nr]; prune_nr++) + ; + prune_alloc = prune_nr; /* not really, but we do not know */ + + while (*av) { + ALLOC_GROW(prune, prune_nr+1, prune_alloc); + prune[prune_nr++] = *av; + av++; + } + if (prune) { + ALLOC_GROW(prune, prune_nr+1, prune_alloc); + prune[prune_nr] = NULL; + } + *prune_data = prune; + } + /* * Parse revision information, filling in the "rev_info" structure, * and removing the used arguments from the argument list.