{"push_id":1206060141,"size":7,"distinct_size":0,"ref":"refs/heads/jk/pager-in-use-careful","head":"dbfd1709c7f2d403575a9ead294f49a013912d26","before":"401776f5e60c638aecb92c861732cffcd17c2e9f","commits":[{"sha":"6b9c38e14cd3abf9b95cabe8b86954f0c4e94a38","author":{"name":"Jeff King","email":"7e57302763bea699aee296fb53304dc616ab92d5@peff.net"},"message":"t0006: skip \"far in the future\" test when unsigned long is not long enough\n\nGit's source code refers to timestamps as unsigned longs.  On 32-bit\nplatforms, as well as on Windows, unsigned long is not large enough\nto capture dates that are \"absurdly far in the future\".\n\nWhile we can fix this issue properly by replacing unsigned long with\na larger type, we want to be a bit more conservative and just skip\nthose tests on the maint track.\n\nSigned-off-by: Jeff King <peff@peff.net>\nHelped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/6b9c38e14cd3abf9b95cabe8b86954f0c4e94a38"},{"sha":"33eacd3ff43e49109594c44e93b7ee66725fb8af","author":{"name":"Junio C Hamano","email":"3228067b6039a0d99bddaf967dafdecd5cc61600@pobox.com"},"message":"Merge branch 'jk/tzoffset-fix' into maint\n\nSkip tests that are unrunnable on platforms without 64-bit long\nto avoid unnecessary test failures.\n\n* jk/tzoffset-fix:\n  t0006: skip \"far in the future\" test when unsigned long is not long enough","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/33eacd3ff43e49109594c44e93b7ee66725fb8af"},{"sha":"e634160bf457f8b3a91125307681c9493f11afb2","author":{"name":"Junio C Hamano","email":"3228067b6039a0d99bddaf967dafdecd5cc61600@pobox.com"},"message":"Git 2.9.2\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/e634160bf457f8b3a91125307681c9493f11afb2"},{"sha":"82246e075e5c028dd886adda68e28de092e33df1","author":{"name":"Junio C Hamano","email":"3228067b6039a0d99bddaf967dafdecd5cc61600@pobox.com"},"message":"Sync with 2.9.2\n\n* maint:\n  Git 2.9.2\n  t0006: skip \"far in the future\" test when unsigned long is not long enough","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/82246e075e5c028dd886adda68e28de092e33df1"},{"sha":"29493589e97a2de0c4c1c314f61ccafaee3b5caf","author":{"name":"Junio C Hamano","email":"3228067b6039a0d99bddaf967dafdecd5cc61600@pobox.com"},"message":"archive-tar: huge offset and future timestamps would not work on 32-bit\n\nAs we are not yet moving everything to size_t but still using ulong\ninternally when talking about the size of object, platforms with\n32-bit long will not be able to produce tar archive with 4GB+ file,\nand cannot grok 077777777777UL as a constant.  Disable the extended\nheader feature and do not test it on them.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/29493589e97a2de0c4c1c314f61ccafaee3b5caf"},{"sha":"585d4569acb879ae3096dacac57a2f0e55032ad3","author":{"name":"Jeff King","email":"7e57302763bea699aee296fb53304dc616ab92d5@peff.net"},"message":"pager_in_use: use git_env_bool\n\nThis function basically reimplements git_env_bool (because\nit predates it). Let's reuse that helper, which is shorter\nand avoids repeating a string literal.","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/585d4569acb879ae3096dacac57a2f0e55032ad3"},{"sha":"dbfd1709c7f2d403575a9ead294f49a013912d26","author":{"name":"Jeff King","email":"7e57302763bea699aee296fb53304dc616ab92d5@peff.net"},"message":"pager_in_use: make sure output is still going to pager\n\nWhen we start a pager, we set GIT_PAGER_IN_USE=1 in the\nenvironment. This lets sub-processes know that even though\nisatty(1) is not true, it is because it is connected to a\npager (and we should still turn on human-readable niceties\nlike auto-color).\n\nUnfortunately, this is too inclusive for scripts which\ninvoke git sub-programs with their stdout going somewhere\nelse. For example, if you run \"git -p pull rebase\", git-pull\nwill invoke \"git rebase\", which invokes:\n\n  git format-patch ... >rebased-patches\n\nThis format-patch process knows that its stdout is not a\ntty, but because of GIT_PAGER_IN_USE it assumes this is\nbecause stdout is going to a pager. As a result, it writes\ncolorized output, and the matching \"git am\" invocation\nchokes on it, causing the rebase to fail.\n\nWe could work around this by passing \"--no-color\" to\nformat-patch, or by removing GIT_PAGER_IN_USE from the\nenvironment. But we should not have to do so; format-patch\nshould be able to realize that even though GIT_PAGER_IN_USE\nis set, its stdout is not actually going to that pager.\n\nFor this simple case, format-patch could see that its output\nis not even a pipe. But that would not catch a case like:\n\n  git format-patch | some-program >rebased-patches\n\nwhere it cannot distinguish between the pipe to the pager\nand the pipe to some-program.\n\nThis patch solves it by actually noting the inode of the\npipe to the pager in the environment, which readers of\nGIT_PAGER_IN_USE can check against their stdout. This\ntechnically makes GIT_PAGER_IN_USE redundant (we can just\ncheck the new GIT_PAGER_PIPE_ID), but we keep using both\nvariables for compatibility with external scripts:\n\n  - scripts which check GIT_PAGER_IN_USE can continue to do\n    so, and will just ignore the new pipe-id variable.\n    Meaning they may accidentally turn on colors if their\n    output is redirected to a file, but that is the same as\n    today and we cannot fix that. We do not actively break\n    them from showing colors when their stdout _does_ go to\n    the pager.\n\n  - scripts which set GIT_PAGER_IN_USE but not\n    GIT_PAGER_PIPE_ID will continue to turn on colorization\n    for git sub-commands (again, they do not benefit from\n    the new code, but we are not making anything worse).\n\nThe inode-retrieval code itself is abstracted into compat/,\nas different platforms may represent the pipe id\ndifferently. These ids do not need to be portable across\nsystems, only within processes on the same system.\n\nNote that there is an existing test in t7006 which tests for\nthe exact _opposite_ of what we are trying to achieve\n(namely, that GIT_PAGER_IN_USE does _not_ cause us to write\ncolors to a random file). This test comes from a battery of\ntests added by 60b6e22 (tests: Add tests for automatic use\nof pager, 2010-02-19), and I think is simply misguided, as\nevidenced by the real \"git pull\" bug above. If you want to\nensure colors in a file, you do it with \"--color\", not by\npretending you have a pager.\n\nRather than delete the test, though, we simply re-title it\nhere. It actually makes a good check of the \"scripts which\nset PAGER_IN_USE but not PAGER_PIPE_ID\" historical\ncompatibility mentioned above.","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/dbfd1709c7f2d403575a9ead294f49a013912d26"}]}
{"actor":{"display_login":"peff"}}