• J
    progress: treat "no terminal" as being in the foreground · a4fb76ce
    Jeff King 提交于
    progress: treat "no terminal" as being in the foreground
    
    Commit 85cb8906 (progress: no progress in background,
    2015-04-13) avoids sending progress from background
    processes by checking that the process group id of the
    current process is the same as that of the controlling
    terminal.
    
    If we don't have a terminal, however, this check never
    succeeds, and we print no progress at all (until the final
    "done" message). This can be seen when cloning a large
    repository; instead of getting progress updates for
    "counting objects", it will appear to hang then print the
    final count.
    
    We can fix this by treating an error return from tcgetpgrp()
    as a signal to show the progress.
    Signed-off-by: NJeff King <peff@peff.net>
    Signed-off-by: NJunio C Hamano <gitster@pobox.com>
    a4fb76ce
progress.c 6.4 KB