import re


def get_humanish_name(url):
    """
    Return the 'humanish' part of a git repository's URL.

    A 'humanish' name is the name of the directory git clone would checkout the
    repository to if no destination directory is specified.
    """
    name = re.sub(r'/$', '', url)
    name = re.sub(r':*/*\.git$', '', name)
    name = re.sub(r'.*[/:]', '', name)
    return name