diff options
| author | Matt Hunter <m@lfurio.us> | 2026-05-31 22:29:38 -0400 |
|---|---|---|
| committer | Matt Hunter <m@lfurio.us> | 2026-05-31 22:29:38 -0400 |
| commit | c91124f69d901416399aad6a721c23077edd3cd5 (patch) | |
| tree | 802b70f4dadafc0a1565aa7a4d793e4ec60809c1 /git-precheck | |
| parent | 33b795656240bbcfa9e9548307c2087fb14b92d1 (diff) | |
| parent | 63e0d7677201e4f175742c0a51edbac9c81abf96 (diff) | |
| download | git-sonar-c91124f69d901416399aad6a721c23077edd3cd5.tar.gz git-sonar-c91124f69d901416399aad6a721c23077edd3cd5.zip | |
Merge branch 'docs'
Completely rewrite documentation, in preparation of the new release.
The README.md file was already a little inaccurate and desynced from the
last tagged git-sonar script, but now that the files have been
redesigned, documentation is in need of a complete face lift.
I've opted to move the meat of the user-facing documentation into
manpages, so that the high fidelity documentation is more accessible on
demand. This also better opens the door for packaging of git-sonar down
the road, providing some form of documentation that will get 'installed'
along with the tool.
The output of --help for each script is removed, and instead --help will
recall that script's manpage using the 'man' command. This is done to
make it more obvious that more verbose docs exist, as well as to reduce
the number of spots for documentation that need to be kept in sync.
README is stripped down to function as a higher-level project
information file, which is more focused and easier to navigate now that
usage documentation has its own home.
* docs:
Replace README with new project information
precheck: Add documentation in new manpage
Update core documentation as git-sonar manpage
Diffstat (limited to 'git-precheck')
| -rwxr-xr-x | git-precheck | 35 |
1 files changed, 3 insertions, 32 deletions
diff --git a/git-precheck b/git-precheck index fa42eb3..52f1781 100755 --- a/git-precheck +++ b/git-precheck @@ -1,35 +1,6 @@ #!/bin/sh -usage() { - echo "git-precheck [--quiet] [--ignore-dirty] [--ignore-untracked]" - echo "" - echo "If the current working directory is inside a git repository, examine" - echo "the repo for any abnormal state and return an exit code indicating" - echo "the status. If unclean, print a line of text describing each" - echo "condition found." - echo "" - echo " --quiet" - echo " Don't actually print anything." - echo "" - echo " --ignore-dirty" - echo " Don't consider the presence of uncommitted changes to tracked" - echo " files as an abnormal state." - echo "" - echo " --ignore-untracked" - echo " Don't consider the presence of untracked files as an abnormal" - echo " state." - echo "" - echo " Exit codes:" - echo " 0 If inside a repository and all checks return normal" - echo " 1 If untracked files detected" - echo " 2 If dirty/modified files detected" - echo " 3 If any ongoing git operation is in progress" - echo " 4 If not inside a git repository" - echo "" - echo " Exit any other value on error or if 'precheck' operation is" - echo " not completed, such as when viewing this help text." - exit 128 -} +docs() { exec man 1 git-precheck; } quiet="" opt_dirty="true" @@ -40,8 +11,8 @@ while true; do --quiet) quiet="true" ;; --ignore-dirty) opt_dirty="" ;; --ignore-untracked) opt_untracked="" ;; - --help) usage ;; - -h) usage ;; + --help) docs ;; + -h) docs ;; *) break esac shift |
