Re: [PATCH] Use "" instead of "<unknown>" for placeholders
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:36
Subsystem:
the rest · Maintainer:
Linus Torvalds
Michal Vitecek [off-list ref] writes: [jc: Added Dscho back on CC: list]
quoted
quoted
quoted
quoted
I made it because I want to use my own pretty format which currently only allows '%s' for subject and '%b' for body. But '%b' is substituted with <undefined> if the body is "missing" which I obviously don't like :)Then you should fix %b not to show "<undefined>".I'll do it if it is okay. Shall I do the same for the other placeholders as well?Yeah. Don't know why I did it that way.Here comes the big patch :)
Now, this breaks t6006 which needs this patch. Looking at this patch, I am not sure if your change is really a desirable one --- shouldn't it be removing the line itself, not just <unknown> token? --- t/t6006-rev-list-format.sh | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/t/t6006-rev-list-format.sh b/t/t6006-rev-list-format.sh
index ad6d0b8..2be323c 100755
--- a/t/t6006-rev-list-format.sh
+++ b/t/t6006-rev-list-format.sh@@ -79,9 +79,9 @@ EOF test_format encoding %e <<'EOF' commit 131a310eb913d107dd3c09a65d1651175898735d -<unknown> + commit 86c75cfd708a0e5868dc876ed5b8bb66c80b4873 -<unknown> + EOF test_format subject %s <<'EOF'
@@ -93,9 +93,9 @@ EOF test_format body %b <<'EOF' commit 131a310eb913d107dd3c09a65d1651175898735d -<unknown> + commit 86c75cfd708a0e5868dc876ed5b8bb66c80b4873 -<unknown> + EOF test_format colors %Credfoo%Cgreenbar%Cbluebaz%Cresetxyzzy <<'EOF'
@@ -121,9 +121,9 @@ test_format complex-encoding %e <<'EOF' commit f58db70b055c5718631e5c61528b28b12090cdea iso8859-1 commit 131a310eb913d107dd3c09a65d1651175898735d -<unknown> + commit 86c75cfd708a0e5868dc876ed5b8bb66c80b4873 -<unknown> + EOF test_format complex-subject %s <<'EOF'
@@ -142,9 +142,9 @@ and it will be encoded in iso8859-1. We should therefore include an iso8859 character: 臓bueno! commit 131a310eb913d107dd3c09a65d1651175898735d -<unknown> + commit 86c75cfd708a0e5868dc876ed5b8bb66c80b4873 -<unknown> + EOF test_done