If I paste in Files (Ctrl + V) and there is a valid Git URL in the clipboard (an URL ending with .git, ), it would be awesome if Files would clone the repository to the current folder.
During my work I use a few different IDE's and Editors. Because each of these work a bit differently to setup a new project, I often find myself firing up the console, navigate to my development root directory and execute a simple git clone URL with an URL copied to clipboard before from GitHub/GitLab/etc.
As we have a Git integration in Files now, it would be awesome if we can simply clone a project by pasting it to a directory.
This could be tricky at the moment as the git code is a plugin and plugins do not (presently) have a hook for pasted files. May be able to add a context menu item though.
Adding a context menu item feels like more than half way there. So even though a shortcut would be nice, I guess its not a must.
Some further thoughts the clone action integration might consider:
If the shortcuts for plugins stuff I did for the Sushi plugin could get merged then it should be possible to assign a shortcut to cloning.
I agree about giving some indication of progress and errors. There is also a question of whether we should support clone options and which (which would presumably require a dialog before the actual cloning).
not sure about cloning options, I don't think thats necessary. In fact, I wasn't even aware there are any options up to this point to be honest 😅️
Showing a progress bar is problematic as I do not think the relevant information and signals are available for Ggit library. May be able to provide a spinner though.
Even a spinner and cancel button do not work easily - the clone_repository function is not asynchronous and cannot be interrupted. So for the moment I am just showing an InfoBar.
Most helpful comment
This could be tricky at the moment as the git code is a plugin and plugins do not (presently) have a hook for pasted files. May be able to add a context menu item though.