Jeff King <peff@xxxxxxxx> writes: > My bigger worry is that this affects only builtins. Which makes it > sufficient for turning off the pager for anything that does USE_PAGER. Hmm. How about doing things this way? - at the beginning of handle_options() remember argv[0] - restructure handle_options() so that it does not run setup_pager() and setenv("GIT_PAGER", "cat", 1) inside the loop, but instead remember what we had on the command line; - after the handle_options() loop, if we saw an explicit --pager, --no-pager, that's the decision; - otherwise: - look at argv[0] to see what the command is; - do the config thing to see if there is user preference; if there is one, that setting decides; - otherwise: - see the built-in defaults; - and finally use or not use pager depending on what we found above. I suspect we would want a similar restructure of handle_options() loop about --git-dir and --git-work-tree so that the loop is only used to decide what to do and action is carried out after the loop exits, but that is a separate topic. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html