Code

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
index 2e0ae5e58ebd2f4ae58d934d9098b9de85c31ab1,9e29ade2b4b7b92d6eb6a4ffad56db37642a3620..239b26adfda494e6568d07b22c28d0c2ef4ca78c
--- 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
index cb67b399fc560c17e1611139aeebb0a51553ecfa,000f27a8fedbb1ed981fc7466176c47cf8fee993..33741ebbc4eec2ab7abdd9b5c045c7a6ec3cada6
@@@ -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)