Code

Merge branch 'jc/terminator-separator'
authorJunio C Hamano <gitster@pobox.com>
Sun, 20 Apr 2008 04:10:54 +0000 (21:10 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sun, 20 Apr 2008 04:10:54 +0000 (21:10 -0700)
* jc/terminator-separator:
  log: teach "terminator" vs "separator" mode to "--pretty=format"

1  2 
builtin-commit.c
revision.c

diff --combined builtin-commit.c
index bcb7aaaa93bb11bfb965fe67a644e2dd46c21c1b,8bf35033e473bccd92d7a3f844904889f698b591..b41d4a3561d6fd4376c1520c3b7dd436674e8325
@@@ -98,7 -98,7 +98,7 @@@ static struct option builtin_commit_opt
        OPT_BOOLEAN('a', "all", &all, "commit all changed files"),
        OPT_BOOLEAN('i', "include", &also, "add specified files to index for commit"),
        OPT_BOOLEAN(0, "interactive", &interactive, "interactively add files"),
 -      OPT_BOOLEAN('o', "only", &only, ""),
 +      OPT_BOOLEAN('o', "only", &only, "commit only specified files"),
        OPT_BOOLEAN('n', "no-verify", &no_verify, "bypass pre-commit hook"),
        OPT_BOOLEAN(0, "amend", &amend, "amend previous commit"),
        OPT_BOOLEAN(0, "untracked-files", &untracked_files, "show all untracked files"),
@@@ -745,8 -745,10 +745,8 @@@ static int parse_and_validate_options(i
                die("No paths with --include/--only does not make sense.");
        if (argc == 0 && only && amend)
                only_include_assumed = "Clever... amending the last one with dirty index.";
 -      if (argc > 0 && !also && !only) {
 +      if (argc > 0 && !also && !only)
                only_include_assumed = "Explicit paths specified without -i nor -o; assuming --only paths...";
 -              also = 0;
 -      }
        if (!cleanup_arg || !strcmp(cleanup_arg, "default"))
                cleanup_mode = use_editor ? CLEANUP_ALL : CLEANUP_SPACE;
        else if (!strcmp(cleanup_arg, "verbatim"))
@@@ -808,7 -810,7 +808,7 @@@ static void print_summary(const char *p
  
        rev.verbose_header = 1;
        rev.show_root_diff = 1;
-       rev.commit_format = get_commit_format("format:%h: %s");
+       get_commit_format("format:%h: %s", &rev);
        rev.always_show_header = 0;
        rev.diffopt.detect_rename = 1;
        rev.diffopt.rename_limit = 100;
diff --combined revision.c
index ffbed3fbf22c22b8862c49bdddd10cab201f86a2,781c503dfcfcab7501e9816b977da55bd84ab012..4231ea2cce57c74a4110c9c69459a4caf67dc15c
@@@ -1083,7 -1083,6 +1083,7 @@@ int setup_revisions(int argc, const cha
                                continue;
                        }
                        if (!strcmp(arg, "--topo-order")) {
 +                              revs->lifo = 1;
                                revs->topo_order = 1;
                                continue;
                        }
                        }
                        if (!prefixcmp(arg, "--pretty")) {
                                revs->verbose_header = 1;
-                               revs->commit_format = get_commit_format(arg+8);
+                               get_commit_format(arg+8, revs);
                                continue;
                        }
                        if (!strcmp(arg, "--root")) {