-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
Show file contents from commit or stash #269
base: develop
Are you sure you want to change the base?
Conversation
0b8d6af
to
a40c0a1
Compare
a40c0a1
to
9692dc8
Compare
access |
approved |
What in the spam is happening... I would rather not block you ... @danilonovaisv |
Fix the merge conflicts and I'll be happy to merge this 👍 |
Hello. I don't think this is in state where it could be merged. It has some issues, such as showing whether the user wants to save the file, and if the user clicks on save, it will get saved to the directory. I am not very skilled with vscode extensions, so I don't really know what's the best way of getting around this. I made this a draft because of that. |
This requires #268, otherwise, there would be an error in arguments to
stashToMagitChanges
.Emacs magit allows browsing contents of files from older configs or changes that were stashed. I tried to implement something similar here.
The way it works is that it opens an unsaved file, with
~{commit hash}~
before the extension (that is to let vscode recognize language correctly). If the user saves the file, it will be saved right away, without any warnings or anything like that. I think it would be great if that could be changed because it's probably not the intended use case to save the file. The thing is that I am not sure how to achieve that in an effective way.I am open to ideas on improving this.