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
index a36c0d9bcd962665fc46fb2a1f75342e176f7773,8750c20e07d7b1533e948d93097a1e091f899bc7..a8a3c3a4bdf5bd9287cb820330e73e8c28b88564
@@@ -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