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

4 messages from 2018-11-20 to 2018-11-21. Participants: Johannes Schindelin via GitGitGadget, Junio C Hamano, Johannes Schindelin.
Thread: https://gitlist.dev/t/49863

## Johannes Schindelin via GitGitGadget, 2018-11-20 09:44

Subject: [PATCH 0/1] rebase: warn about the correct tree's OID
Message-ID: <pull.85.git.gitgitgadget@gmail.com>
URL: https://gitlist.dev/e/pull.85.git.gitgitgadget%40gmail.com

```
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, 2018-11-20 09:44

Subject: [PATCH 1/1] rebase: warn about the correct tree's OID
Message-ID: <d55ede7e4d46d67c070f87df9689ffe8af2d5737.1542707070.git.gitgitgadget@gmail.com>
URL: https://gitlist.dev/e/d55ede7e4d46d67c070f87df9689ffe8af2d5737.1542707070.git.gitgitgadget%40gmail.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

```

## Junio C Hamano, 2018-11-21 04:47

Subject: Re: [PATCH 0/1] rebase: warn about the correct tree's OID
Message-ID: <xmqqefbf82aj.fsf@gitster-ct.c.googlers.com>
URL: https://gitlist.dev/e/xmqqefbf82aj.fsf%40gitster-ct.c.googlers.com
In-Reply-To: <pull.85.git.gitgitgadget@gmail.com>

```
"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.

Will apply.


>  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, 2018-11-21 22:15

Subject: Re: [PATCH 0/1] rebase: warn about the correct tree's OID
Message-ID: <nycvar.QRO.7.76.6.1811212315000.41@tvgsbejvaqbjf.bet>
URL: https://gitlist.dev/e/nycvar.QRO.7.76.6.1811212315000.41%40tvgsbejvaqbjf.bet
In-Reply-To: <xmqqefbf82aj.fsf@gitster-ct.c.googlers.com>

```
Hi Junio,

On Wed, 21 Nov 2018, Junio C Hamano wrote:

> "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

```
