threads / bug / 52108

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

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

## tl;dr

2 messages between Oct 24, 2019 and Oct 25, 2019.

replies: 1people: 2as markdown or json

ydirson@free.fr· Oct 24, 2019, 10:42 UTC · lore
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· Oct 25, 2019, 13:09 UTC · re: ydirson@free.fr · lore

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

Hi Yann,
On Thu, 24 Oct 2019, ydirson@free.fr wrote:
Show 19 quoted lines
> 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

← back to recent threads