Set the default pager to less for git

Issue #31 resolved
Justin Dearing created an issue

I'm not sure the correct place to open this.

The file pkg_perzl_git-2.2.2-1.lst brings in less. However, by default pager that git finds is more, which cannot process the color coding of git log and git diff. The simple fix to this is the command git config --system core.pager /usr/bin/less. If that was run as part of the rpm post install script it would make a lot of sense.

Comments (7)

  1. Aaron Bartell

    Hi Justin,

    Concerning whether it should be posted here, yes, post perzl.org related rpm issues here.

    Glad you posted because I've had this issue since 2014 and have worked around it by turning coloring off.

    The rpm files are obtained directly from perzl.org, unchanged. We (the ibmichroot project) don't change them. With that said, IBM recently announced at WMCPA that they will ship Git with 5733OPS. This issue might be remedied in their release (I don't have it yet, it's not yet GA'd).

    Further, your desire to do post-processing of pkg_setup.sh is a current TODO detailed here.

  2. Justin Dearing reporter

    Aaron,

    Thanks for bringing that TODO to my attention. RPMs in and of themselves have their own post install hook scripts and rpm -qR git shows that less is a requirement of the git rpm. Therefore, it would seem to me sensible that getting perzl.org to rebuild the RPM with a modified SPEC file would be the correct course of action.

    Is my logic correct?

  3. Justin Dearing reporter

    I have not heard back @aaronbartell. I've been told by someone else in the community that he has never gotten an email reponse from him either. Have you had luck contacting this person?

  4. Aaron Bartell

    @zippy1981, no I've not contacted Michael Perzl before.

    Note, it is now public knowledge that IBM will be releasing Git with the next iteration of 5733OPS. I am hoping they've addressed this issue in their distribution.

    With that said, my hope is we can get to the point of creating our own packages for IBM i by making changes to existing repos and doing pull requests so our changes are back in base repos. I am starting to test the waters with that concept: letsencrypt bash and jffi for JRuby.

    ##If anybody needs a place to practice open source just let me know. I can get you setup with a free account on Litmis Spaces.

  5. Aaron Bartell

    With the forthcoming release of the package manager from IBM the package installation for git and less will no longer be required.

    For historical purposes, here is how to change to less as the default.

    echo "[core]" >> ~.gitconfig
    echo "  pager = less" >> ~/.gitconfig
    

    Marking as resolved.

  6. Log in to comment