• J
    init: handle empty "template" parameter · d65d2b2f
    Jeff King 提交于
    If a user passes "--template=", then our template parameter
    is blank. Unfortunately, copy_templates() assumes it has at
    least one character, and does all sorts of bad things like
    reading from template[-1] and then proceeding to link all of
    '/' into the .git directory.
    
    This patch just checks for that condition in copy_templates
    and aborts. As a side effect, this means that --template=
    now has the meaning "don't copy any templates."
    Signed-off-by: NJunio C Hamano <gitster@pobox.com>
    d65d2b2f
t0001-init.sh 3.2 KB