# [BUG] "git rebase -r" lacks sanitation on merges with arbitrary reference syntax

2 messages from 2019-10-24 to 2019-10-25. Participants: ydirson@free.fr, Johannes Schindelin.
Thread: https://gitlist.dev/t/52108

## ydirson@free.fr, 2019-10-24 10:42

Subject: [BUG] "git rebase -r" lacks sanitation on merges with arbitrary reference syntax
Message-ID: <479118979.-772834452.1571913751603.JavaMail.root@zimbra39-e7>
URL: https://gitlist.dev/e/479118979.-772834452.1571913751603.JavaMail.root%40zimbra39-e7
In-Reply-To: <717060483.-772858077.1571913448492.JavaMail.root@zimbra39-e7>

```
Hello,

I have a branch which does successive merges from a vendor branch, like:

 git merge vendor/poky-intercepts^{/warrior}'
 git merge vendor/poky-intercepts^{/zeus}'

Now if I try to use "rebase -r" across such a merge, the result is:

 error: refusing to update ref with bad name 'refs/rewritten/vendor/poky-intercepts^{/warrior}'
 hint: Could not execute the todo command
 hint: 
 hint:     label vendor/poky-intercepts^{/warrior}
 hint: 
 hint: It has been rescheduled; To edit the command before continuing, please
 hint: edit the todo list first:
 hint: 
 hint:     git rebase --edit-todo
 hint:     git rebase --continue

If I manually sanitize the label name, everything's fine.

```

## Johannes Schindelin, 2019-10-25 13:09

Subject: Re: [BUG] "git rebase -r" lacks sanitation on merges with arbitrary reference syntax
Message-ID: <nycvar.QRO.7.76.6.1910251508100.46@tvgsbejvaqbjf.bet>
URL: https://gitlist.dev/e/nycvar.QRO.7.76.6.1910251508100.46%40tvgsbejvaqbjf.bet
In-Reply-To: <479118979.-772834452.1571913751603.JavaMail.root@zimbra39-e7>

```
Hi Yann,

On Thu, 24 Oct 2019, ydirson@free.fr wrote:

> I have a branch which does successive merges from a vendor branch, like:
>
>  git merge vendor/poky-intercepts^{/warrior}'
>  git merge vendor/poky-intercepts^{/zeus}'
>
> Now if I try to use "rebase -r" across such a merge, the result is:
>
>  error: refusing to update ref with bad name 'refs/rewritten/vendor/poky-intercepts^{/warrior}'
>  hint: Could not execute the todo command
>  hint:
>  hint:     label vendor/poky-intercepts^{/warrior}
>  hint:
>  hint: It has been rescheduled; To edit the command before continuing, please
>  hint: edit the todo list first:
>  hint:
>  hint:     git rebase --edit-todo
>  hint:     git rebase --continue
>
> If I manually sanitize the label name, everything's fine.

The patch series is stalled a little:
https://github.com/gitgitgadget/git/pull/327

Unfortunately, we are deep in -rc mode for the upcoming v2.24.0, so I
don't think that this bug fix will make it into that release, there are
more pressing bugs.

But it is still on my radar!

Ciao,
Johannes

```
