IBM / ibmichroot

A set of scripts to facilitate the use of chroot-based containers for IBM i
MIT License
21 stars 9 forks source link

Set the default pager to less for git #31

Closed abmusse closed 6 years ago

abmusse commented 8 years ago

Original report by Justin Dearing (Bitbucket: zippy1981, GitHub: zippy1981).


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.

abmusse commented 6 years ago

Original comment by Aaron Bartell (Bitbucket: aaronbartell, GitHub: aaronbartell).


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.

abmusse commented 8 years ago

Original comment by Aaron Bartell (Bitbucket: aaronbartell, GitHub: aaronbartell).


@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.

abmusse commented 8 years ago

Original comment by Justin Dearing (Bitbucket: zippy1981, GitHub: zippy1981).


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?

abmusse commented 8 years ago

Original comment by Justin Dearing (Bitbucket: zippy1981, GitHub: zippy1981).


Email him yesterday, waiting to hear back.

abmusse commented 8 years ago

Original comment by Aaron Bartell (Bitbucket: aaronbartell, GitHub: aaronbartell).


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?

Sounds good to me. Want to take that on? Here's Michael Perzl's contact page.

abmusse commented 8 years ago

Original comment by Justin Dearing (Bitbucket: zippy1981, GitHub: zippy1981).


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?

abmusse commented 8 years ago

Original comment by Aaron Bartell (Bitbucket: aaronbartell, GitHub: aaronbartell).


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.