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

[PATCH 1/1] rebase: warn about the correct tree's OID

From
Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>
Date
Nov 20, 2018, 09:44 UTC
Message-ID
<d55ede7e4d46d67c070f87df9689ffe8af2d5737.1542707070.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.85.git.gitgitgadget@gmail.com>
From: Johannes Schindelin <johannes.schindelin@gmx.de>

This was a simple copy/paste error, and an obvious one at that: if we cannot fill the tree descriptor, we should show an error message about *that* tree, not another one.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 builtin/rebase.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/builtin/rebase.c b/builtin/rebase.c
index 1a2758756a..5b3e5baec8 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -582,7 +582,8 @@ static int reset_head(struct object_id *oid, const char *action,
 	}
 
 	if (!reset_hard && !fill_tree_descriptor(&desc[nr++], &head_oid)) {
-		ret = error(_("failed to find tree of %s"), oid_to_hex(oid));
+		ret = error(_("failed to find tree of %s"),
+			    oid_to_hex(&head_oid));
 		goto leave_reset_head;
 	}
 
-- 
gitgitgadget
Previous: Johannes Schindelin via GitGitGadgetNext: Junio C Hamano
Message 2 of 4 in “rebase: warn about the correct tree's OID”
  1. 0/1 rebase: warn about the correct tree's OIDJohannes Schindelin via GitGitGadget, Nov 20, 2018
  2. 1/1 rebase: warn about the correct tree's OIDJohannes Schindelin via GitGitGadget, Nov 20, 2018
  3. Junio C HamanoNov 21, 2018
  4. Johannes SchindelinNov 21, 2018

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.