How to fix git log output (missing lines in less)?

后端 未结 2 1089
走了就别回头了
走了就别回头了 2021-01-18 15:08

I have two different servers each running a Ubuntu installation. On both of them, I have set env LESS=-FerX which makes sure that git log output is displayed ni

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-18 16:02

    Perhaps you know this, and you might have tried it, but since you don't mention it:

    man git config contains (emphasis mine):

    core.pager 
    

    The command that git will use to paginate output. Can be overridden with the GIT_PAGER environment variable. Note that git sets the LESS environment variable to FRSX if it is unset when it runs the pager. One can change these settings by setting the LESS variable to some other value. Alternately, these settings can be overridden on a project or global basis by setting the core.pager option. Setting core.pager has no affect on the LESS environment variable behaviour above, so if you want to override git’s default settings this way, you need to be explicit. For example, to disable the S option in a backward compatible manner, set core.pager to less -+$LESS -FRX. This will be passed to the shell by git, which will translate the final command to LESS=FRSX less -+FRSX -FRX.

提交回复
热议问题