Skip to contentSkip to conversation

rebase: warn about the correct tree's OID

PATCH In review Johannes Schindelin via GitGitGadget 3 participants 4 messages Nov 20, 2018 – Nov 21, 2018

lore
Share & tools
lore
#0 lore raw

cover rebase: warn about the correct tree's OID

A quick fix for a recent topic. Not overly critical, but I would deem this v2.20.0-rc1 material.

Johannes Schindelin (1):
rebase: warn about the correct tree's OID

 builtin/rebase.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

base-commit: bb75be6cb916297f271c846f2f9caa3daaaec718
Published-As: https://github.com/gitgitgadget/git/releases/tags/pr-85%2Fdscho%2Freset_head-typo-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-85/dscho/reset_head-typo-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/85

Signature · 1 line
gitgitgadget
#1 lore raw

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

From: Johannes Schindelin <[email protected]>

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.

---
 builtin/rebase.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
builtin/rebase.c +2 -1
index 1a2758756a..5b3e5baec8 100644
@@ -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;
 	}
 
Signature · 1 line
gitgitgadget
#2 lore raw
In reply to Johannes Schindelin via GitGitGadget

"Johannes Schindelin via GitGitGadget" <[email protected]>

Quoted 6 lines · writes:

A quick fix for a recent topic. Not overly critical, but I would deem this v2.20.0-rc1 material.

Johannes Schindelin (1):
rebase: warn about the correct tree's OID

Yup, it is kind of embarrasing that nobody caught it, but at the same time, this typo is at so tiny level that I would not be surprised if it survived for many years.

Will apply.

Quoted 8 lines
 builtin/rebase.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

base-commit: bb75be6cb916297f271c846f2f9caa3daaaec718
Published-As: https://github.com/gitgitgadget/git/releases/tags/pr-85%2Fdscho%2Freset_head-typo-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-85/dscho/reset_head-typo-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/85

#3 lore raw

Hi Junio,

Quoted 6 lines · Junio C Hamano

"Johannes Schindelin via GitGitGadget" <[email protected]>

Quoted 3 lines · writes:

A quick fix for a recent topic. Not overly critical, but I would deem this v2.20.0-rc1 material.

Quoted 7 lines
Quoted 3 lines

Johannes Schindelin (1):
rebase: warn about the correct tree's OID

Yup, it is kind of embarrasing that nobody caught it, but at the same time, this typo is at so tiny level that I would not be surprised if it survived for many years.

TBH I am quite mortified that it slipped through *my* multiple pre-contribution reviews.

Quoted 1 line

Will apply.

Thanks.

Ciao,
Dscho