Merge branch 'lt/logopt' into next
authorJunio C Hamano <junkio@cox.net>
Sun, 16 Apr 2006 07:52:55 +0000 (00:52 -0700)
committerJunio C Hamano <junkio@cox.net>
Sun, 16 Apr 2006 08:02:33 +0000 (01:02 -0700)
* lt/logopt:
  Tentative built-in "git show"
  Built-in git-whatchanged.
  rev-list option parser fix.
  Split init_revisions() out of setup_revisions()

1  2 
git.c
rev-list.c

diff --cc git.c
--- 1/git.c
--- 2/git.c
+++ b/git.c
@@@ -330,13 -327,11 +327,13 @@@ static int cmd_log_wc(int argc, const c
                        putchar(' ');
                else
                        putchar('\n');
-               pretty_print_commit(opt->commit_format, commit, ~0, buf,
-                                   LOGSIZE, wcopt->abbrev);
+               pretty_print_commit(rev->commit_format, commit, ~0, buf,
+                                   LOGSIZE, rev->abbrev);
                printf("%s\n", buf);
-               if (wcopt->do_diff) {
-                       printf("---\n");
-                       log_tree_commit(opt, commit);
 -              if (rev->diff)
++              if (rev->diff) {
++                      printf("--\n");
+                       log_tree_commit(rev, commit);
 +              }
                shown = 1;
                free(commit->buffer);
                commit->buffer = NULL;
diff --cc rev-list.c
@@@ -365,14 -329,14 +329,16 @@@ int main(int argc, const char **argv
  
        list = revs.commits;
  
-       if (!list &&
-           (!(revs.tag_objects||revs.tree_objects||revs.blob_objects) && !revs.pending_objects))
+       if ((!list &&
+            (!(revs.tag_objects||revs.tree_objects||revs.blob_objects) &&
+             !revs.pending_objects)) ||
+           revs.diff)
                usage(rev_list_usage);
  
-       save_commit_buffer = verbose_header;
+       save_commit_buffer = revs.verbose_header;
        track_object_refs = 0;
 +      if (bisect_list)
 +              revs.limited = 1;
  
        prepare_revision_walk(&revs);
        if (revs.tree_objects)