Merge branch 'jc/log-stdin'
authorJunio C Hamano <gitster@pobox.com>
Tue, 24 Nov 2009 06:30:08 +0000 (22:30 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 24 Nov 2009 06:30:08 +0000 (22:30 -0800)
* 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

1  2 
builtin-blame.c
builtin-rev-list.c
bundle.c
revision.c
revision.h

diff --cc builtin-blame.c
Simple merge
Simple merge
diff --cc bundle.c
Simple merge
diff --cc 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.
diff --cc revision.h
Simple merge