git-project-manager icon indicating copy to clipboard operation
git-project-manager copied to clipboard

Add support to clone into folder

Open felipecaputo opened this issue 7 years ago • 3 comments

To avoid getting out of editor to clone a repository, add this command to Git Project Manager

felipecaputo avatar Mar 18 '17 14:03 felipecaputo

Hey, @felipecaputo! I implemented it some time ago in GitHub Manager, so wanna give some considerations:

  • let user clone into default dir (AFAIK builtin clone command always shows directory select)
  • warn if cloning repository is big and suggest shallow clone
  • let user to specify pattern of cloning folder name (might be useful to avoid name conflicts)
  • don't forget to add the cancel button

AFAIK it's not possible to reuse builtin command, so you need to implement progressbar yourself (or just copy from git ext). Do you still have interest on this issue? Let me know if I can help with it here..

zardoy avatar Nov 30 '21 13:11 zardoy

Hi @zardoy, that would be awesome to have some help in this one.

let user clone into default dir (AFAIK builtin clone command always shows directory select)

Maybe we can use the base projects directories as a list of where to clone, since usually this config value have the folders that we usually clone projects.

  • But also, allow going into subfolders of the base folders that are not repos can be a plus

The other things were perfect.

Let me know if I can assign you this issue and can count with me in any kind of help

felipecaputo avatar Dec 09 '21 18:12 felipecaputo

Maybe we can use the base projects directories as a list of where to clone, since usually this config value have the folders that we usually clone projects

Yeah, I don't mind displaying quickpick by default. By there should also be settings that would allow:

  • to always clone in specific location without prompting (number of item from base dir or string - path)
  • (in case if settings above is configured) to still show the quickpick with location from above selected by default

I understand that this might be too complicated at first time, but for now I didn't find a better way to provide sane defaults with customizability in mind

Also how do you image the process of whole command? AFAIK this extension doesn't use authentication namespace to integrate with GitHub or other git services.

Do you want to make it look like mine GitHub Manager or official GitHub Repositories extension where you can search for you repo and clone it. Or where extension doesn't provide any integration, but let's user to enter arbitrary URL or repo slug (if GitHub)?

zardoy avatar Dec 09 '21 19:12 zardoy