[RFC PATCH 3/4] Attach reflog to commit prior to pretty-printing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use attach_reflog_info just prior to pretty-printing the commit, so the
reflog info may be printed if desired.

Signed-off-by: Deskin Miller <deskinm@xxxxxxxxx>
---
 list-objects.c |    3 +++
 log-tree.c     |    3 +++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/list-objects.c b/list-objects.c
index c8b8375..fd9d23e 100644
--- a/list-objects.c
+++ b/list-objects.c
@@ -5,6 +5,7 @@
 #include "blob.h"
 #include "diff.h"
 #include "tree-walk.h"
+#include "reflog-walk.h"
 #include "revision.h"
 #include "list-objects.h"
 
@@ -146,6 +147,8 @@ void traverse_commit_list(struct rev_info *revs,
 
 	while ((commit = get_revision(revs)) != NULL) {
 		process_tree(revs, commit->tree, &objects, NULL, "");
+		if (revs->reflog_info)
+			attach_reflog_info(revs->reflog_info, commit);
 		show_commit(commit);
 	}
 	for (i = 0; i < revs->pending.nr; i++) {
diff --git a/log-tree.c b/log-tree.c
index 84a74e5..5ccca0e 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -387,6 +387,9 @@ void show_log(struct rev_info *opt)
 	 */
 	if (need_8bit_cte >= 0)
 		need_8bit_cte = has_non_ascii(opt->add_signoff);
+	if (opt->reflog_info) {
+		attach_reflog_info(opt->reflog_info, commit);
+	}
 	pretty_print_commit(opt->commit_format, commit, &msgbuf,
 			    abbrev, subject, extra_headers, opt->date_mode,
 			    need_8bit_cte);
-- 
1.6.2.rc0.90.g0753

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux