Merge branch 'jk/maint-reflog-walk-count-vs-time' into maint
authorJunio C Hamano <gitster@pobox.com>
Mon, 14 May 2012 18:46:16 +0000 (11:46 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 14 May 2012 18:46:16 +0000 (11:46 -0700)
Gives a better DWIM behaviour for --pretty=format:%gd, "stash list", and
"log -g", depending on how the starting point ("master" vs "master@{0}" vs
"master@{now}") and date formatting options (e.g. "--date=iso") are given
on the command line.

By Jeff King (4) and Junio C Hamano (1)
* jk/maint-reflog-walk-count-vs-time:
  reflog-walk: tell explicit --date=default from not having --date at all
  reflog-walk: always make HEAD@{0} show indexed selectors
  reflog-walk: clean up "flag" field of commit_reflog struct
  log: respect date_mode_explicit with --format:%gd
  t1411: add more selector index/date tests

1  2 
builtin/rev-list.c
commit.h
log-tree.c
pretty.c
reflog-walk.c
reflog-walk.h

Simple merge
diff --cc commit.h
Simple merge
diff --cc log-tree.c
Simple merge
diff --cc pretty.c
Simple merge
diff --cc reflog-walk.c
index 86d18843f52046d87741bffa9f865ec973a2ae73,0c904fb2d1637f63b28a44caafd3d40e437266a9..b2fbdb2392f80a531d5f9a21630a036d45c0a827
@@@ -295,20 -301,8 +305,20 @@@ void get_reflog_message(struct strbuf *
        strbuf_add(sb, info->message, len);
  }
  
 +const char *get_reflog_ident(struct reflog_walk_info *reflog_info)
 +{
 +      struct commit_reflog *commit_reflog = reflog_info->last_commit_reflog;
 +      struct reflog_info *info;
 +
 +      if (!commit_reflog)
 +              return NULL;
 +
 +      info = &commit_reflog->reflogs->items[commit_reflog->recno+1];
 +      return info->email;
 +}
 +
  void show_reflog_message(struct reflog_walk_info *reflog_info, int oneline,
-       enum date_mode dmode)
+                        enum date_mode dmode, int force_date)
  {
        if (reflog_info && reflog_info->last_commit_reflog) {
                struct commit_reflog *commit_reflog = reflog_info->last_commit_reflog;
diff --cc reflog-walk.h
index afb1ae3fde93a5c61def211be56b0554a25dd45e,3adccb018bd996c3222bdbc89843265d800a02b4..50265f51c56431025b665abf34ac29fdce3d302b
@@@ -11,13 -11,12 +11,13 @@@ extern int add_reflog_for_walk(struct r
  extern void fake_reflog_parent(struct reflog_walk_info *info,
                struct commit *commit);
  extern void show_reflog_message(struct reflog_walk_info *info, int,
-               enum date_mode);
+                               enum date_mode, int force_date);
  extern void get_reflog_message(struct strbuf *sb,
                struct reflog_walk_info *reflog_info);
 +extern const char *get_reflog_ident(struct reflog_walk_info *reflog_info);
  extern void get_reflog_selector(struct strbuf *sb,
                struct reflog_walk_info *reflog_info,
-               enum date_mode dmode,
+               enum date_mode dmode, int force_date,
                int shorten);
  
  #endif