On 11/19, Enzo Matsumiya wrote:
When pager setup succeeds, the second run is a noop, because isatty(1)
is no longer true. But for the case you're interested in, the first one
fails, so we do try again. And I can reproduce your problem with:
No, it's not a noop such as that it's clear that things are different on
the second call.
Here I meant that setup_pager() is effectivelly called from 2 different places:
First backtrace:
setup_pager()
commit_pager_choice()
run_builtin()
handle_builtin()
run_argv()
cmd_main()
Second backtrace:
setup_pager()
cmd_log_init_finish()
cmd_log_init()
cmd_show()
run_builtin()
handle_builtin()
run_argv()
cmd_main()
Also, isatty(1) is not false in neither of the calls. Otherwise I
wouldn't hit this bug (pager would be NULL and setup_pager() a noop as
you said).
Cheers,
Enzo