-
-
Notifications
You must be signed in to change notification settings - Fork 137
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
feature: inline diff select commit/branch to diff #1855
base: master
Are you sure you want to change the base?
Conversation
Not sure what to do with this one. Did you even pushed the correct version? I don't see how having a normal I do like the idea to some extend. T.i. I can imagine being in an inline-diff view to hit maybe You're correct that there aren't any obvious other ways to open a "historical" inline-diff. I think you can add normal diffs between branches and/or commits, e.g. from the graph or branches views. And then when you're seeing such a diff you can open the inline diff which will copy the target and base correctly. That's a rather indirect feature. We could have it in the menu of a File History. Inline diffs show only one file at a time, that's why we don't have links for them in say the branches view or the standard graph view. It just doesn't fit as long as you're not in a context of a file. From that perspective one could add a command to the file revision views to then compare that file revision with the current HEAD/working dir state. |
you're right, i forgot to push the commit which allows calling git, I'm using different code on my machine that doesn't modify gitsavvy so it can update without me losing this functionality. pushed now. Tbh, this was a low quality PR that doesn't make proper use of gitsavvy's codebase and features, i haven't delved into it enough to contribute correctly. Just wanted to share the idea and if it was something you guys liked, then I could try spending time on fixing it, with some direction yea wrt using the graph, as there is no context of a file I couldn't think of an easy way to get this functionality without having to go through a few steps that might seem abit convoluted. Maybe a command that when selecting to compare with another commit, a quick panel can open to select a file? As for while in File History, I assume it only follows the current branch? That covers my use case 90% of the time, but sometimes I want to compare against a different branch that is newer So yea, please let me know if this idea seems useful, maybe abit more brainstorming is needed for workflow, and I can give it more attention |
I don't forget you, I'm just a bit busy, okay? |
no problem at all, there's no rush |
fix: add GitCommand inheritance fix: git branches should be git branch fix: window command needs window active view instead of self.view fix: get base_commit from git instead of view settings
a198d7a
to
88426fd
Compare
Inline diff currently compares the file's current state vs the last commit, then you can cycle through previous states using n/p.
My usecase is usually current state vs last commit or completely different branch/commit so I've come up with a workaround.
Manual commit id entry
Branches
fetches the branch list then it will compare against the lastest commit in that branch
Commits
fetches the last N commits (default is 20) along with the commit message
Theres probably a better way of integrating the idea with the graph view, but this was good enough for me to whip up quickly. Thought id share incase it can be adapted and be a useful idea/addition