-
Notifications
You must be signed in to change notification settings - Fork 317
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
git stash #309
Comments
+1 |
Let's start simple we could add two commands:
On the backendyou will need to create two methods in the
The you will need to add a handler for those in class GitStashHandler(GitHandler):
@tornado.web.authenticated
async def post(self, path: str = ""):
# ... call git stash
@tornado.web.authenticated
async def delete(self, path: str = "", name: str = ""):
# ... call git stash pop You can look for example at jupyterlab-git/jupyterlab_git/handlers.py Lines 398 to 409 in 35f712f
and jupyterlab-git/jupyterlab_git/handlers.py Lines 430 to 440 in 35f712f
Then you will need to bind a new endpoint with the handlers at jupyterlab-git/jupyterlab_git/handlers.py Line 901 in 35f712f
I advice you to add some tests to check your implementation - see e.g. https://github.com/jupyterlab/jupyterlab-git/blob/master/jupyterlab_git/tests/test_remote.py On the frontendYou need to add two methods for those two actions in Line 35 in 35f712f
Then you will need to add two commands that call those methods; taking inspiration from jupyterlab-git/src/commandsAndMenu.tsx Lines 199 to 243 in 35f712f
To test them, you could add them to the menu at https://github.com/jupyterlab/jupyterlab-git/blob/master/src/commandsAndMenu.tsx#L1320 I let you imagine a UI for those features. |
Closing as resolved y #1228 |
Similarly to the
History
tab, it would be useful to have a tab for managing stashed changes.The text was updated successfully, but these errors were encountered: