show-branch: make the current branch and merge commits stand out.

This changes the character used to mark the commits that is on the
branch from '+' to '*' for the current branch, to make it stand out.
Also we show '-' for merge commits.

When you have a handful branches with relatively long diversion, it
is easier to see which one is the current branch this way.

Signed-off-by: Junio C Hamano <junkio@cox.net>
diff --git a/show-branch.c b/show-branch.c
index f1bce49..ea3d9e4 100644
--- a/show-branch.c
+++ b/show-branch.c
@@ -545,6 +545,7 @@
 	int sha1_name = 0;
 	int shown_merge_point = 0;
 	int topo_order = 0;
+	int head_at = -1;
 
 	git_config(git_show_branch_config);
 	setup_git_directory();
@@ -675,6 +676,8 @@
 			}
 			/* header lines never need name */
 			show_one_commit(rev[i], 1);
+			if (is_head)
+				head_at = i;
 		}
 		if (0 <= extra) {
 			for (i = 0; i < num_rev; i++)
@@ -703,9 +706,19 @@
 		shown_merge_point |= ((this_flag & all_revs) == all_revs);
 
 		if (1 < num_rev) {
-			for (i = 0; i < num_rev; i++)
-				putchar((this_flag & (1u << (i + REV_SHIFT)))
-					? '+' : ' ');
+			int is_merge = !!(commit->parents && commit->parents->next);
+			for (i = 0; i < num_rev; i++) {
+				int mark;
+				if (!(this_flag & (1u << (i + REV_SHIFT))))
+					mark = ' ';
+				else if (is_merge)
+					mark = '-';
+				else if (i == head_at)
+					mark = '*';
+				else
+					mark = '+';
+				putchar(mark);
+			}
 			putchar(' ');
 		}
 		show_one_commit(commit, no_name);