• J
    diff-index.c: "git diff" has no need to read blob from the standard input · 4682d852
    Junio C Hamano 提交于
    Only "diff --no-index -" does.  Bolting the logic into the low-level
    function diff_populate_filespec() was a layering violation from day
    one.  Move populate_from_stdin() function out of the generic diff.c
    to its only user, diff-index.c.
    
    Also make sure "-" from the command line stays a special token "read
    from the standard input", even if we later decide to sanitize the
    result from prefix_filename() function in a few obvious ways,
    e.g. removing unnecessary "./" prefix, duplicated slashes "//" in
    the middle, etc.
    Signed-off-by: NJunio C Hamano <gitster@pobox.com>
    4682d852
diff.c 122.5 KB