Open a4lg opened 1 year ago
Any update on this? Would be epic.
Also looking for this!
Hello 👋 Any news on this?
Unfortunately this isn't on our short-term roadmap. Would someone like to open a pull request to get it started?
Thanks for answering so quickly 🙏 Do you think it's something tricky or rather something doable for someone who doesn't know the codebase? I work as a freelance so I might be able to try between contracts.
At first blush it doesn't seem to tricky to meet Tier 1 (or Tier 2) above, since it should be largely internal to the rebase editor.
Here is the extension host side ("server") of the rebase editor: https://github.com/gitkraken/vscode-gitlens/blob/01fa090c9359831ce54f8c52734da5b689ce4b31/src/webviews/rebase/rebaseEditor.ts
Here is the webview side ("app") of the rebase editor: https://github.com/gitkraken/vscode-gitlens/blob/9e709d706a7581647b69123c76cadc6fb9897a83/src/webviews/apps/rebase/rebase.ts
Thanks for the hints, I'll have a look!
@eamodio I had no problem to build, watch and even package the extension. Super nice that it worked with 0 effort👌
However, from the contributing file, I don't understand the development workflow. What I'm looking for is a way to watch for changes and have these changes applied to the GitLens extension in VSCode.
Today, I have to run yarn package
, wait for it to run and then manually install the new .vsix from the VSCode UI.
Did I miss something?
Ok I understand now. I did this which I didn't realize was not only useful for debugging but also to manually try things in the UI.
When I wanted to open a test folder, VSCode opened it in a new window where GitLens wasn't available, though.
I used code -r <path>
to open my test folder in the current window, but I had to look for it. Maybe something worth adding to the contributing file?
I've updated the CONTRIBUTING docs with some more details -- do they help?
Yes they do, thanks! Here is what I think would be best. If you like these changes I'll open a PR :)
Tier 1 in progress! I'll have to make it pretty, now.
I took way too much time for so few changes, but 🤷🏻♂️
For now I added | update-ref: ${ref}
after the commit message.
About Tier 2 I understand that you could drop an update-ref entry, but what would "directly reorder[ing]" it mean? Could you move it anywhere along your commits? Also, what would the UX look like? I don't think I have a good enough git understanding to be super relevant here.
About Tier 3 Today, the rebasing flow is the following:
How should we implement the update-refs
flag selection?
Is this PR still being worked on? If not, I thought I might have a go.
Personally, I think any update-ref
line in the git-rebase-todo file, should be represented as it's own line in the editor, that can be dragged up or down, like the commits. By placing the update-ref
after a commit, you are effectively saying "move the pointer for this branch to include all commits before it."
Personally, I think any
update-ref
line in the git-rebase-todo file, should be represented as it's own line in the editor, that can be dragged up or down, like the commits. By placing theupdate-ref
after a commit, you are effectively saying "move the pointer for this branch to include all commits before it."
Yep, this is actually useful when stacking branches: https://adamj.eu/tech/2022/10/15/how-to-rebase-stacked-git-branches/#add-changes-to-stacked-branches
I've created (https://github.com/gitkraken/vscode-gitlens/pull/3705) for this. This is my first PR, so hopefully I've done things correctly.
Git 2.38 added the
--update-refs
option togit rebase
.For instance, assume following repository:
and we are on the
feat3
branch.If we run regular
git rebase main
command, the result will be:On the other hand, if we run new
git rebase --update-refs main
command (new in Git 2.38), the result will be:As you notice, not just
feat3
branch, intermediate referencesfeat1
andfeat2
are updated.If we run the command
git rebase -i --update-refs main
, the defaultgit-rebase-todo
will look like this:Note that,
git-rebase-todo
file will have someupdate-ref
lines by default, not justpick
s (whengit rebase -i --update-refs
is run and a reference to update is found). It would be nice if we can safely manageupdate-ref
lines (not to break intermediate references/checkpoints).Some of my thoughts follow:
update-ref
entries on the interactive rebase editor (just like other lines likepick
? or with a special appearance?)update-ref
entries (through reordering other lines)update-ref
entries if necessaryupdate-ref
entries