summaryrefslogtreecommitdiff
path: root/t/t5305-include-tag.sh
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2008-07-03 07:46:57 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2008-07-06 02:20:24 -0700
commit4e10738a9392ad285aca7d3a19e6775d6b7b513e (patch)
tree85ba8351cdccee8a1d905fe662c60378a43cde23 /t/t5305-include-tag.sh
parentMerge branch 'qq/maint' (diff)
downloadtgif-4e10738a9392ad285aca7d3a19e6775d6b7b513e.tar.xz
Allow per-command pager config
There is great debate over whether some commands should set up a pager automatically. This patch allows individuals to set their own pager preferences for each command, overriding the default. For example, to disable the pager for git status: git config pager.status false If "--pager" or "--no-pager" is specified on the command line, it takes precedence over the config option. There are two caveats: - you can turn on the pager for plumbing commands. Combined with "core.pager = always", this will probably break a lot of things. Don't do it. - This only works for builtin commands. The reason is somewhat complex: Calling git_config before we do setup_git_directory has bad side effects, because it wants to know where the git_dir is to find ".git/config". Unfortunately, we cannot call setup_git_directory indiscriminately, because some builtins (like "init") break if we do. For builtins, this is OK, since we can just wait until after we call setup_git_directory. But for aliases, we don't know until we expand (recursively) which command we're doing. This should not be a huge problem for aliases, which can simply use "--pager" or "--no-pager" in the alias as appropriate. For external commands, however, we don't know we even have an external command until we exec it, and by then it is too late to check the config. An alternative approach would be to have a config mode where we don't bother looking at .git/config, but only at the user and system config files. This would make the behavior consistent across builtins, aliases, and external commands, at the cost of not allowing per-repo pager config for at all. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5305-include-tag.sh')
0 files changed, 0 insertions, 0 deletions