Skip to content
  • Andreas Ericsson's avatar
    fetch: Strip usernames from url's before storing them · 47abd85b
    Andreas Ericsson authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    When pulling from a remote, the full URL including username
    is by default added to the commit message. Since it adds
    very little value but could be used by malicious people to
    glean valid usernames (with matching hostnames), we're far
    better off just stripping the username before storing the
    remote URL locally.
    
    Note that this patch has no lasting visible effect when
    "git pull" does not create a merge commit. It simply
    alters what gets written to .git/FETCH_HEAD, which is used
    by "git merge" to automagically create its messages.
    
    Signed-off-by: default avatarAndreas Ericsson <ae@op5.se>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    47abd85b