dmusican / Elegit

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

Automatically generate local directory name from repository URL #497

Closed tatebosler closed 7 years ago

tatebosler commented 7 years ago

This implements automatic repository name generation in #467. When the user enters a remote repository URL, the "Repository name" field will be automatically populated with the last portion of the URL.

For instance, https://github.com/dmusican/Elegit.git will result in the repository name field being set to "Elegit".

This should probably be split out into its own method and properly unit-tested before being merged into master, but the underlying logic is up and running.

erictwalker18 commented 7 years ago

Git and jgit also allow you to clone using, for example, git clone https://github.com/dmusican/Elegit. After adding unit tests/refactoring into its own method, consider how to deal with that case (if we should deal with it at all)