fork-dev / Tracker

Bug and issue tracker for Fork for Mac
505 stars 12 forks source link

Jump to parent commit not working anymore #2070

Closed craftey closed 1 month ago

craftey commented 7 months ago

In the commit view under "All commits" I used the parent hashes to quickly navigate to previous commits.

Bildschirmfoto 2024-02-20 um 10 57 53

But clicking on them now (version 2.40) just opens a popup. How can I jump to previous commits now? If not possible, can you revert to the old behavior, please?

Kindly, craftey

craftey commented 7 months ago

Actually, using arrow keys instead of mouse for that purpose would be perfect. Atm arrow keys jump to previous commits over all branches. I would prefer to jump along a branch.

DanPristupov commented 7 months ago

Try https://cdn.fork.dev/mac/Fork-2.40.2.dmg

craftey commented 7 months ago

Click to jump works again. Thank you.

As feature request, I would like to have some key commands for this. Maybe as menu entry, so I could use macOS keyboard settings to set a shortcut myself. I know it might be difficult because merge commits have two parents. And branches of a commit have two or more(!) childs.

Maybe jumping via shortcut forwards and backwards along the "default" branch typically "develop" or "main" would be useful for me. You could maybe use some heuristic based on branch names and the gitflow setup if initialized to detect the "default" branch or you can somehow ask the server, what the default branch is.

Of course, within a feature branch jumping would also be nice. Here maybe the active branch could be used to determine the branch along which the jumping goes.

But I really would like to jump along the "default" branch even if the current branch is some other (feature) branch. That would be the most important shortcut for me.

DanPristupov commented 7 months ago

But I really would like to jump along the "default" branch even if the current branch is some other (feature) branch.

You can press left

craftey commented 7 months ago

Some brainstorming, what about this: If on a merge commit:

If on a commit that branches:

within a branch (not on a merge commit):

A:

if there is no child merge commit: B:

The only difficult situation left is a loop in the graph. Here I have currently no other idea as to prefer rule A or B. I would go with A.

A combination of A and B might be possible: right arrow - like rule A + if there is no more right parent of nearest child merge commit (rule A) then we could switch to rule B. left arrow - accordingly

craftey commented 7 months ago

You can press left

Oh, interesting. It sort of hides the right parent branch on a merge commit and changes the minus to a plus on the merge commit. But how does this help me jump to parent commits along branches? My preferred topology sorting is by date, if that matters.

craftey commented 7 months ago

I see what might be your idea. Left arrow in combination with hiding all branches except the one I am interested in, this somewhat works. I am looking here into a repo with many long running branches. But if other branches are visible, left arrow is not enough. Also if I just want to jump to parents I have to left-collapse all these commits on the way down and after that I have to undo this for all collapsed merge commits.

craftey commented 7 months ago

Actually, you already have some quite good heuristic to detect what commits might belong to a long running branch over time. The colors. Only in rare cases the color changes within a long running branch. So if up and down would follow the colored line, that would be quite helpful. Maybe some modifier key + up and down.

craftey commented 7 months ago

https://gitup.co does an ok job when it comes to navigating nodes in the branch tree with arrow keys. It is not perfect but maybe you can do something better. The goal is to be able to navigate along branches with up and down and somehow switch to sibling branches with left and right - in a date sorted tree (actually it can be a graph with cycles).