dmusican / Elegit

A GUI client for people who want to learn Git.
MIT License
30 stars 7 forks source link

Guessing Repository Name #467

Closed twodee closed 7 years ago

twodee commented 7 years ago

When cloning a new remote repository, it'd be friendly to guess the repository name based on the remote URL. For example, if I paste in https://github.com/yoozer/reepo in the remote clone dialog, the repository name field is automatically set to reepo. But probably only if it's blank.

dmusican commented 7 years ago

Agreed, this would be nice to have!

dmusican commented 7 years ago

See this comment regarding making this feature also work with ssh repos. While you're at it: that would make this functionality just complex enough that it should be factored out as a separate method, called from within the anonymous listener method. Giving it a descriptive name, something like extractRepoName would make the code more clear without even needing documentation to do it. That method could then also be unit tested.