• N
    gc: save log from daemonized gc --auto and print it next time · 329e6e87
    Nguyễn Thái Ngọc Duy 提交于
    While commit 9f673f94 (gc: config option for running --auto in
    background - 2014-02-08) helps reduce some complaints about 'gc
    --auto' hogging the terminal, it creates another set of problems.
    
    The latest in this set is, as the result of daemonizing, stderr is
    closed and all warnings are lost. This warning at the end of cmd_gc()
    is particularly important because it tells the user how to avoid "gc
    --auto" running repeatedly. Because stderr is closed, the user does
    not know, naturally they complain about 'gc --auto' wasting CPU.
    
    Daemonized gc now saves stderr to $GIT_DIR/gc.log. Following gc --auto
    will not run and gc.log printed out until the user removes gc.log.
    Signed-off-by: NNguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: NJunio C Hamano <gitster@pobox.com>
    329e6e87
gc.c 10.2 KB