{"thread":{"id":"64849","subject":"make \"git --pager/--nopager\" work as intended","startedAt":"2026-01-22T09:44:32Z","lastAt":"2026-01-22T17:17:36Z","messageCount":2,"participants":["Harald Dunkel","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"534435","messageId":"87o6mm2djm.fsf@tweety.afaics.de","threadId":"64849","inReplyTo":null,"subject":"make \"git --pager/--nopager\" work as intended","fromName":"Harald Dunkel","fromEmail":"harri@afaics.de","sentAt":"2026-01-22T09:37:49Z","receivedAt":"2026-01-22T09:44:32Z","isPatch":false,"sender":{"key":"harri@afaics.de","avatar":null},"body":"Hi folks,\n\nmaybe its neurological, but the current behavior of \"git -p\" vs \"git -P\"\nmakes me feel uneasy. Some commands (like git diff) use a pager by default,\nsome ues it even without need (git branch), others don't. For every other\ngit command I run I have the feeling git output is not working as intended.\n\nSetting core.pager to \"cat\" is not a solution. It breaks git -p.\n\nRegards\nHarri\n"},{"id":"534475","messageId":"xmqqzf65o9ck.fsf@gitster.g","threadId":"64849","inReplyTo":"87o6mm2djm.fsf@tweety.afaics.de","subject":"Re: make \"git --pager/--nopager\" work as intended","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-01-22T17:17:31Z","receivedAt":"2026-01-22T17:17:36Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Harald Dunkel <harri@afaics.de> writes:\n\n> Hi folks,\n>\n> maybe its neurological, but the current behavior of \"git -p\" vs \"git -P\"\n> makes me feel uneasy. Some commands (like git diff) use a pager by default,\n> some ues it even without need (git branch), others don't. For every other\n> git command I run I have the feeling git output is not working as intended.\n>\n> Setting core.pager to \"cat\" is not a solution. It breaks git -p.\n>\n> Regards\n> Harri\n\nI am not sure what is being asked here on the subject.  As far as I\nunderstand, \"git -p cmd\" and \"git -P cmd\" do work as intended in\nthat they override the default choice of use (or non-use) of pager,\nbuilt into each individual command.\n\nIf you are saying that you disagree with the built-in choice made by\nsome of the commands, perhaps the following snippet from \"git help\nconfig\" may help?\n\n    pager.<cmd>::\n            If the value is boolean, turns on or off pagination of the\n            output of a particular Git subcommand when writing to a tty.\n            Otherwise, turns on pagination for the subcommand using the\n            pager specified by the value of `pager.<cmd>`.  If `--paginate`\n            or `--no-pager` is specified on the command line, it takes\n            precedence over this option.  To disable pagination for all\n            commands, set `core.pager` or `GIT_PAGER` to `cat`.\n\nSo, if you have too many local branches like I do (I seem to have\n411 of them as of this writing), \n\n\t[pager]\n\t\tbranch = false\n\nwould probably what you want?  With it \"git -p branch\" would still\nlet me paginate through all 411 local branches, and \"git branch\" and\n\"git -P branch\" would make them scroll away.\n\n\n\t\n"}]}