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

[PATCH 2/5] sequencer: strip bogus LF at end of error messages

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Dec 22, 2017, 23:55 UTC
Message-ID
<c4343a241548152f99e3f90162c8539ba4f993e5.1513986836.git.johannes.schindelin@gmx.de>
In-Reply-To
<cover.1513986836.git.johannes.schindelin@gmx.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 sequencer.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sequencer.c b/sequencer.c
index 115085d39ca..8e6b6289be6 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -491,7 +491,7 @@ static int is_index_unchanged(void)
 	struct commit *head_commit;
 
 	if (!resolve_ref_unsafe("HEAD", RESOLVE_REF_READING, &head_oid, NULL))
-		return error(_("could not resolve HEAD commit\n"));
+		return error(_("could not resolve HEAD commit"));
 
 	head_commit = lookup_commit(&head_oid);
 
@@ -511,7 +511,7 @@ static int is_index_unchanged(void)
 
 	if (!cache_tree_fully_valid(active_cache_tree))
 		if (cache_tree_update(&the_index, 0))
-			return error(_("unable to update cache tree\n"));
+			return error(_("unable to update cache tree"));
 
 	return !oidcmp(&active_cache_tree->oid,
 		       &head_commit->tree->object.oid);
@@ -697,12 +697,12 @@ static int is_original_commit_empty(struct commit *commit)
 	const struct object_id *ptree_oid;
 
 	if (parse_commit(commit))
-		return error(_("could not parse commit %s\n"),
+		return error(_("could not parse commit %s"),
 			     oid_to_hex(&commit->object.oid));
 	if (commit->parents) {
 		struct commit *parent = commit->parents->item;
 		if (parse_commit(parent))
-			return error(_("could not parse parent commit %s\n"),
+			return error(_("could not parse parent commit %s"),
 				oid_to_hex(&parent->object.oid));
 		ptree_oid = &parent->tree->object.oid;
 	} else {
-- 
2.15.1.windows.2
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 3 of 8 in “A couple of sequencer cleanups”
  1. 0/5 A couple of sequencer cleanupsJohannes Schindelin, Dec 22, 2017
  2. 1/5 rebase: do not continue when the todo list generation failedJohannes Schindelin, Dec 22, 2017
  3. 2/5 sequencer: strip bogus LF at end of error messagesJohannes Schindelin, Dec 22, 2017
  4. 3/5 sequencer: remove superfluous conditionalJohannes Schindelin, Dec 22, 2017
  5. 4/5 sequencer: report when noop has an argumentJohannes Schindelin, Dec 22, 2017
  6. 5/5 sequencer: do not invent whitespace when transforming OIDsJohannes Schindelin, Dec 22, 2017
  7. Liam BeguinDec 27, 2017
  8. Junio C HamanoDec 27, 2017

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.