kahole / edamagit

Magit for VSCode
https://marketplace.visualstudio.com/items?itemName=kahole.magit
MIT License
1.13k stars 66 forks source link

Show file contents from commit or stash #269

Open Rutherther opened 1 year ago

Rutherther commented 1 year ago

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.

danilonovaisv commented 1 year ago

access

danilonovaisv commented 1 year ago

approved

kahole commented 1 year ago

What in the spam is happening... I would rather not block you ... @danilonovaisv

kahole commented 12 months ago

Fix the merge conflicts and I'll be happy to merge this 👍

Rutherther commented 12 months ago

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.