Code

Merge branch 'jc/shortlog-e'
authorJunio C Hamano <gitster@pobox.com>
Thu, 13 Dec 2007 01:07:03 +0000 (17:07 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 13 Dec 2007 01:07:03 +0000 (17:07 -0800)
* jc/shortlog-e:
  shortlog: default to HEAD when the standard input is a tty
  Invert numbers and names in the git-shortlog summary mode.
  shortlog: document -e option
  git-shortlog -e: show e-mail address as well

1  2 
builtin-log.c

diff --combined builtin-log.c
index b6a11220e258468bddd92181bf18ce55343abf2e,d375c9dbf9759d9ddc8a0029bc5803057e5f117d..cc3cc9069a824740d2d5cceba95597e036f67120
@@@ -18,9 -18,6 +18,6 @@@
  static int default_show_root = 1;
  static const char *fmt_patch_subject_prefix = "PATCH";
  
- /* this is in builtin-diff.c */
- void add_head(struct rev_info *revs);
  static void add_name_decoration(const char *prefix, const char *name, struct object *obj)
  {
        int plen = strlen(prefix);
@@@ -557,7 -554,7 +554,7 @@@ static void get_patch_ids(struct rev_in
  
  static void gen_message_id(char *dest, unsigned int length, char *base)
  {
 -      const char *committer = git_committer_info(-1);
 +      const char *committer = git_committer_info(IDENT_WARN_ON_NO_NAME);
        const char *email_start = strrchr(committer, '<');
        const char *email_end = strrchr(committer, '>');
        if(!email_start || !email_end || email_start > email_end - 1)
@@@ -665,7 -662,7 +662,7 @@@ int cmd_format_patch(int argc, const ch
                         !strcmp(argv[i], "-s")) {
                        const char *committer;
                        const char *endpos;
 -                      committer = git_committer_info(1);
 +                      committer = git_committer_info(IDENT_ERROR_ON_NO_NAME);
                        endpos = strchr(committer, '>');
                        if (!endpos)
                                die("bogos committer info %s\n", committer);
                         * does not have.
                         */
                        rev.pending.objects[0].item->flags |= UNINTERESTING;
-                       add_head(&rev);
+                       add_head_to_pending(&rev);
                }
                /*
                 * Otherwise, it is "format-patch -22 HEAD", and/or