If I use a difftool that has simple shell output how to use pager that is set up in core.pager .gitconfig section?

有帮助吗?

解决方案

git help config says:

pager.<cmd>
    If the value is boolean, turns on or off pagination of the output of a particular
    git subcommand when writing to a tty. Otherwise, turns on pagination for the
    subcommand using the pager specified by the value of pager.<cmd>. If --paginate or
    --no-pager is specified on the command line, it takes precedence over this option.
    To disable pagination for all commands, set core.pager or GIT_PAGER to cat.

So all you need is to add a [pager] section in .gitconfig and to place difftool = true there.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top