threads / patch / 49863

patchrebase: warn about the correct tree's OID

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

## tl;dr

4 messages between Nov 20, 2018 and Nov 21, 2018. Diffs are folded; open one to read it.

replies: 3people: 2as markdown or json

Johannes Schindelin via GitGitGadget· Nov 20, 2018, 09:44 UTC · lore

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
-- 
gitgitgadget
Johannes Schindelin via GitGitGadget· Nov 20, 2018, 09:44 UTC · re: Johannes Schindelin via GitGitGadget · lore

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

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(-)
Show changes to builtin/rebase.c +2 −1
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
Junio C Hamano· Nov 21, 2018, 04:47 UTC · re: Johannes Schindelin via GitGitGadget · lore

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

"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com> writes:

Show 6 quoted lines
> 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.
Show 8 quoted 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
Johannes Schindelin· Nov 21, 2018, 22:15 UTC · re: Junio C Hamano · lore

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

Hi Junio,
On Wed, 21 Nov 2018, Junio C Hamano wrote:
Show 13 quoted lines
> "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
> 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.

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

> Will apply.
Thanks.

Ciao, Dscho

← back to recent threads