Open LinqLover opened 3 years ago
Cloning is currently analogous to git clone URL target-dir
instead of just git clone URL
(which creates a new subdirectory and guesses the name from the last part of the URL). The rationale is that you must choose a directory, so it would be strange to make it analogous to the command without a directory.
If we change the behavior to always create a directory, we lose the current "option" of setting the eventual directory directly.
TortoiseGit solves this with an intermediary clone dialog, where the target directory text field is prepopulated with a new directory, but one can still change this.
I think the proper solution would be a proper clone dialog here as well, instead of just showing a directory chooser. Anyone willing to implement one?
I think for the actual issue I noticed above, an extra warning message that is raised before cloning into a non-empty directory might already suffice. A better dialog, on the other hand, would also not harm, of course. :-)
I have added the confirmation prompt if the chosen directory is not empty.
I have already too many
.git
directories directly in some of my image folders because I somehow assumed that Squot would create a new subdirectory by itself, and I just did it again. :-( Would it be possible to always create a new directory? Or at least warn if the directory to clone into is not empty? :-)