sk- / git-lint

improving source code one step at a time
Apache License 2.0
236 stars 78 forks source link

man page #86

Open MareoRaft opened 7 years ago

MareoRaft commented 7 years ago

In an effort to help you support a man page for git-lint, this can be a place for sharing information about git man pages.

The command git --man-path let's you know where the man pages for git are stored on your system.

For example, on OSX, it seems that if path/to/git is the installation directory for git, then your man page belongs in path/to/git/2.4.0/share/man/man1, where 2.4.0 is the version number of the git installation. More specifically, you want to create the file path/to/git/2.4.0/share/man/man1/git-lint.1. On FreeBSD, it seems that the man pages belong in /usr/local/man/man1. On ubuntu, the man pages belong in /usr/share/man/man1.

I have verified that the mere presence of a proper man page file named git-lint.1 in that location will cause git help lint and git lint --help to function correctly as wanted. It is necessary that git-lint is in fact installed in order for this to work. Otherwise, the same command will look for the file gitlint.1 (without the dash) instead.

MareoRaft commented 7 years ago

It seems that

TO_PATH=$(git --man-path)
sudo mv "$GIT_LINT_MAN_PAGE" "$TO_PATH""/man1/git-lint.1"

as part of the installation process should work on OSX Mavericks, FreeBSD 10.2, and ubuntu-trusty-64.