summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6aead43)
raw | patch | inline | side by side (parent: 6aead43)
author | Junio C Hamano <junkio@cox.net> | |
Mon, 9 Apr 2007 09:34:05 +0000 (02:34 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 12 Apr 2007 03:02:03 +0000 (20:02 -0700) |
When used with '--boundary A...B', this shows the -/</> marker
you would get with --left-right option to 'git-log' family.
When symmetric diff is not used, everybody is shown to be on the
"right" branch.
Signed-off-by: Junio C Hamano <junkio@cox.net>
you would get with --left-right option to 'git-log' family.
When symmetric diff is not used, everybody is shown to be on the
"right" branch.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Documentation/pretty-formats.txt | patch | blob | history | |
commit.c | patch | blob | history |
index 2fe6c319675926afe1609ad7c221dceb42c82310..d7ffc21ddf1e1241d8c485920e6ce56fe38c3f35 100644 (file)
- '%Cgreen': switch color to green
- '%Cblue': switch color to blue
- '%Creset': reset color
+- '%m': left, right or boundary mark
- '%n': newline
diff --git a/commit.c b/commit.c
index 754d1b8a0b8282fd3d1d6bd8f6ccb21b407504a5..952095faa70dd8f5166f106a83382e50e131897a 100644 (file)
--- a/commit.c
+++ b/commit.c
#include "pkt-line.h"
#include "utf8.h"
#include "interpolate.h"
+#include "diff.h"
+#include "revision.h"
int save_commit_buffer = 1;
{ "%Cgreen" }, /* green */
{ "%Cblue" }, /* blue */
{ "%Creset" }, /* reset color */
- { "%n" } /* newline */
+ { "%n" }, /* newline */
+ { "%m" }, /* left/right/bottom */
};
enum interp_index {
IHASH = 0, IHASH_ABBREV,
ISUBJECT,
IBODY,
IRED, IGREEN, IBLUE, IRESET_COLOR,
- INEWLINE
+ INEWLINE,
+ ILEFT_RIGHT,
};
struct commit_list *p;
char parents[1024];
int i;
enum { HEADER, SUBJECT, BODY } state;
- if (INEWLINE + 1 != ARRAY_SIZE(table))
+ if (ILEFT_RIGHT + 1 != ARRAY_SIZE(table))
die("invalid interp table!");
/* these are independent of the commit */
interp_set_entry(table, ITREE_ABBREV,
find_unique_abbrev(commit->tree->object.sha1,
DEFAULT_ABBREV));
+ interp_set_entry(table, ILEFT_RIGHT,
+ (commit->object.flags & BOUNDARY)
+ ? "-"
+ : (commit->object.flags & SYMMETRIC_LEFT)
+ ? "<"
+ : ">");
parents[1] = 0;
for (i = 0, p = commit->parents;