git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Use "" instead of "<unknown>" for placeholders

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 21, 2007, 20:12 UTC
Message-ID
<7vk5qjixqy.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20070921140500.GB9072@mageo.cz>
Michal Vitecek <fuf@mageo.cz> writes:
[jc: Added Dscho back on CC: list]
Show 13 quoted lines
>>> >> 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
Previous: Michal VitecekNext: Johannes Schindelin
Message 6 of 12 in “Added a new placeholder '%cm' for full commit message”
  1. Added a new placeholder '%cm' for full commit messageMichal Vitecek, Sep 21, 2007
  2. Johannes SchindelinSep 21, 2007
  3. Michal VitecekSep 21, 2007
  4. Johannes SchindelinSep 21, 2007
  5. Use "" instead of "<unknown>" for placeholders [was Re: [PATCH] Added a new placeholder '%cm' for full commit message]Michal Vitecek, Sep 21, 2007
  6. Junio C HamanoSep 21, 2007
  7. Johannes SchindelinSep 21, 2007
  8. Michal VitecekSep 22, 2007
  9. Michal VitecekSep 25, 2007
  10. Johannes SchindelinSep 25, 2007
  11. Michal VitecekSep 25, 2007
  12. Johannes SchindelinSep 25, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.