Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for --update-ref #872

Closed
glensc opened this issue Jul 20, 2023 · 9 comments
Closed

Add support for --update-ref #872

glensc opened this issue Jul 20, 2023 · 9 comments
Labels
investigate Requires investigation

Comments

@glensc
Copy link

glensc commented Jul 20, 2023

https://adamj.eu/tech/2022/10/15/how-to-rebase-stacked-git-branches/

suggests to set the flag globally:

git config --global --add --bool rebase.updateRefs true

yet this breaks this tool:

✖ git rebase origin/main -i  
hint: Waiting for your editor to close the file... Invalid action: update-ref
error: There was a problem with the editor 'interactive-rebase-tool'.

please add support for the flag, and maybe (if needed) update-ref command type

$ git --version
git version 2.41.0
$ interactive-rebase-tool --version
interactive-rebase-tool 2.2.1 (2023-03-13)
@MitMaro MitMaro added the investigate Requires investigation label Jul 20, 2023
@MitMaro
Copy link
Owner

MitMaro commented Jul 20, 2023

Thanks for the issue!

update-ref support was added this past November, however, looking at that version number, it should be working for you.

Probably a bug in the parsing, let me take a look!

@MitMaro
Copy link
Owner

MitMaro commented Jul 20, 2023

@glensc , can you give version 2.3.0 a try?

It was released yesterday, and update-ref seems to be working in all my tests.

If it's not working, mind sharing the update-ref line(s) that is failing for you? You can anonymize it.

@glensc
Copy link
Author

glensc commented Jul 21, 2023

@MitMaro I think the problem is not about update-ref rebase lines, but that --update-ref is set as a global option:

git config --global --add --bool rebase.updateRefs true

the editor is not even launched, aborts with error:

✖ git rebase origin/main -i  
hint: Waiting for your editor to close the file... Invalid action: update-ref
error: There was a problem with the editor 'interactive-rebase-tool'.

from my ~/.gitconfig I find these lines:

[sequence]
    editor = interactive-rebase-tool
[interactive-rebase-tool]
    autoSelectNext = true
[rebase]
   updateRefs = true    

@glensc
Copy link
Author

glensc commented Jul 21, 2023

Update: seems 2.3.0 was released just 2 days ago:

so, that's why it's not yet in brew.

and can't run the file directly from downloads, killed as not from a verified developer

~/Downloads/macos-interactive-rebase-tool          
zsh: killed     ~/Downloads/macos-interactive-rebase-tool

so have to wait for brew update to test :)

@glensc
Copy link
Author

glensc commented Jul 21, 2023

Update2: brew update pr is here, but currently build failing:

@neersighted
Copy link

This feature was implemented in 2.3.0, and I have been using it myself with rebase.updateRefs = true for several months. I think this issue can be closed 😄

@MitMaro
Copy link
Owner

MitMaro commented Jul 21, 2023

Thanks @neersighted ! Good to hear that it's been working for you over the past several months.

I will keep the issue open until @glensc can confirm that it works on their system (once 2.3.0 hits homebrew), just in case there is some odd edge case.

@glensc
Copy link
Author

glensc commented Jul 31, 2023

2.3.0 hit homebrew!

@glensc
Copy link
Author

glensc commented Jul 31, 2023

I can confirm 2.3.0 no longer gives the parse error!

@glensc glensc closed this as completed Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigate Requires investigation
Projects
None yet
Development

No branches or pull requests

3 participants