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

[PATCH 1/2] log-tree: fix confusing comment

From
Jeff King <peff@peff.net>
Date
Jul 1, 2009, 07:26 UTC
Message-ID
<20090701072628.GA8101@sigio.peff.net>
In-Reply-To
<20090701070252.GA7987@sigio.peff.net>

This comment mentions the case where use_terminator is set, but this case is not handled at all by this chunk of code.

Signed-off-by: Jeff King <peff@peff.net>
---
This comment confused me quite a bit while tracking down the issue in
2/2.
 log-tree.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/log-tree.c b/log-tree.c
index 59d63eb..6f73c17 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -321,7 +321,8 @@ void show_log(struct rev_info *opt)
 	}
 
 	/*
-	 * If use_terminator is set, add a newline at the end of the entry.
+	 * If use_terminator is set, we already handled any record termination
+	 * at the end of the last record.
 	 * Otherwise, add a diffopt.line_termination character before all
 	 * entries but the first.  (IOW, as a separator between entries)
 	 */
-- 
1.6.3.3.485.g0f5d4.dirty
Previous: Jeff KingNext: Jeff King
Message 10 of 12 in “RFH - git-log variant that _does_ search through diffs”
  1. Eric RaibleJun 30, 2009
  2. Jeff KingJun 30, 2009
  3. Junio C HamanoJun 30, 2009
  4. Eric RaibleJun 30, 2009
  5. Eric RaibleJun 30, 2009
  6. Jeff KingJun 30, 2009
  7. Eric RaibleJun 30, 2009
  8. Eric RaibleJun 30, 2009
  9. Jeff KingJul 1, 2009
  10. 1/2 log-tree: fix confusing commentJeff King, Jul 1, 2009
  11. 2/2 fix missing NUL termination with pretty=tformatJeff King, Jul 1, 2009
  12. Junio C HamanoJul 1, 2009

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.