Merge branch 'master' into js/fmt-patch
authorJunio C Hamano <junkio@cox.net>
Sat, 6 May 2006 21:42:08 +0000 (14:42 -0700)
committerJunio C Hamano <junkio@cox.net>
Sat, 6 May 2006 21:42:59 +0000 (14:42 -0700)
* master: (109 commits)
  t1300-repo-config: two new config parsing tests.
  Another config file parsing fix.
  update-index: plug memory leak from prefix_path()
  checkout-index: plug memory leak from prefix_path()
  update-index --unresolve: work from a subdirectory.
  pack-object: squelch eye-candy on non-tty
  core.prefersymlinkrefs: use symlinks for .git/HEAD
  repo-config: trim white-space before comment
  Fix for config file section parsing.
  Clarify git-cherry documentation.
  Update git-unpack-objects documentation.
  Fix up docs where "--" isn't displayed correctly.
  Several trivial documentation touch ups.
  git-svn 1.0.0
  git-svn: documentation updates
  delta: stricter constness
  Makefile: do not link rev-list any specially.
  builtin-push: --all and --tags _are_ explicit refspecs
  builtin-log/whatchanged/show: make them official.
  show-branch: omit uninteresting merges.
  ...

1  2 
builtin.h
cache.h
git.c
log-tree.c
show-branch.c

diff --cc builtin.h
index 94dc0732f9f42069f375673ce1b26aa0b43c26e6,bb63f0729a4a05e60ef3e609b971bdf57b60b06d..635a00bf7a20ef347944f364c5f89e978ce50af9
+++ b/builtin.h
@@@ -19,6 -19,9 +19,10 @@@ extern int cmd_version(int argc, const 
  extern int cmd_whatchanged(int argc, const char **argv, char **envp);
  extern int cmd_show(int argc, const char **argv, char **envp);
  extern int cmd_log(int argc, const char **argv, char **envp);
+ extern int cmd_diff(int argc, const char **argv, char **envp);
 +extern int cmd_format_patch(int argc, const char **argv, char **envp);
+ extern int cmd_count_objects(int argc, const char **argv, char **envp);
+ extern int cmd_push(int argc, const char **argv, char **envp);
  
  #endif
diff --cc cache.h
Simple merge
diff --cc git.c
index 619c6654e45d0208adefc6aecf723c5c25fd4a7b,49ba5189d923493aaed40a6a0fccc2ead040b06a..a8f7926b4875512b1d93768c1bc6d934111954f6
--- 1/git.c
--- 2/git.c
+++ b/git.c
@@@ -47,7 -46,9 +46,10 @@@ static void handle_internal_command(in
                { "log", cmd_log },
                { "whatchanged", cmd_whatchanged },
                { "show", cmd_show },
+               { "push", cmd_push },
 +              { "fmt-patch", cmd_format_patch },
+               { "count-objects", cmd_count_objects },
+               { "diff", cmd_diff },
        };
        int i;
  
diff --cc log-tree.c
index 4a3cd6791b43c9dd98c0237e9b0577deca9d1b37,b90ba6762ad0aa469a19c42cf8d53f7a79db02d5..526d578e98eef5a099be43bf39a300b33ac1991c
@@@ -38,31 -49,14 +50,33 @@@ void show_log(struct rev_info *opt, str
        /*
         * Print header line of header..
         */
 -      printf("%s%s",
 -              opt->commit_format == CMIT_FMT_ONELINE ? "" : "commit ",
 -              diff_unique_abbrev(commit->object.sha1, abbrev_commit));
 -      if (opt->parents)
 -              show_parents(commit, abbrev_commit);
 -      if (parent)
 -              printf(" (from %s)", diff_unique_abbrev(parent->object.sha1, abbrev_commit));
 -      putchar(opt->commit_format == CMIT_FMT_ONELINE ? ' ' : '\n');
 +
 +      if (opt->commit_format == CMIT_FMT_EMAIL) {
 +              if (opt->total > 0) {
 +                      static char buffer[64];
 +                      snprintf(buffer, sizeof(buffer),
 +                                      "Subject: [PATCH %d/%d] ",
 +                                      opt->nr, opt->total);
 +                      subject = buffer;
 +              } else if (opt->total == 0)
 +                      subject = "Subject: [PATCH] ";
 +              else
 +                      subject = "Subject: ";
 +
 +              printf("From %s  Thu Apr 7 15:13:13 2005\n",
 +                     sha1_to_hex(commit->object.sha1));
 +      } else {
 +              printf("%s%s",
 +                     opt->commit_format == CMIT_FMT_ONELINE ? "" : "commit ",
 +                     diff_unique_abbrev(commit->object.sha1, abbrev_commit));
++              if (opt->parents)
++                      show_parents(commit, abbrev_commit);
 +              if (parent) 
 +                      printf(" (from %s)",
 +                             diff_unique_abbrev(parent->object.sha1,
 +                                                abbrev_commit));
 +              putchar(opt->commit_format == CMIT_FMT_ONELINE ? ' ' : '\n');
 +      }
  
        /*
         * And then the pretty-printed message itself
diff --cc show-branch.c
Simple merge