summaryrefslogtreecommitdiffstats
path: root/git-precheck.1
diff options
context:
space:
mode:
authorMatt Hunter <m@lfurio.us>2026-05-31 22:29:38 -0400
committerMatt Hunter <m@lfurio.us>2026-05-31 22:29:38 -0400
commitc91124f69d901416399aad6a721c23077edd3cd5 (patch)
tree802b70f4dadafc0a1565aa7a4d793e4ec60809c1 /git-precheck.1
parent33b795656240bbcfa9e9548307c2087fb14b92d1 (diff)
parent63e0d7677201e4f175742c0a51edbac9c81abf96 (diff)
downloadgit-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.1')
-rw-r--r--git-precheck.167
1 files changed, 67 insertions, 0 deletions
diff --git a/git-precheck.1 b/git-precheck.1
new file mode 100644
index 0000000..e0861b2
--- /dev/null
+++ b/git-precheck.1
@@ -0,0 +1,67 @@
+.TH GIT\-PRECHECK 1 git\-sonar
+
+.SH NAME
+git\-precheck \- detect "unready" state of a git repository
+
+.SH SYNOPSIS
+.B git\-precheck
+.RB [ \-\-quiet ]
+.RB [ \-\-ignore\-dirty ]
+.RB [ \-\-ignore\-untracked ]
+
+.SH DESCRIPTION
+If
+.B git\-precheck
+is run inside a git repository, it examines the repo for any in\-progress git
+operations or unclean state and returns an exit code indicating the status.
+Otherwise,
+.B git\-precheck
+reports that it is not in any git worktree.
+.P
+If
+.B \-\-quiet
+is not given, a line of text is printed describing each condition found.
+
+.SH OPTIONS
+.TP
+.B \-\-quiet
+Don't actually print anything.
+.TP
+.B \-\-ignore\-dirty
+Don't consider the presence of uncommitted changes to tracked files as an
+unclean state.
+.TP
+.B \-\-ignore\-untracked
+Don't consider the presence of untracked files as an unclean state.
+
+.SH EXIT STATUS
+.TP
+.B 0
+If inside a repository and all checks return normal
+.TP
+.B 1
+If untracked files are detected
+.TP
+.B 2
+If dirty/modified files are detected
+.TP
+.B 3
+If any ongoing git operation is in progress
+.TP
+.B 4
+If not inside a git repository
+.P
+.B git\-precheck
+will exit with any other value if an error occurs.
+
+.SH SEE ALSO
+.BR git\-sonar (1),
+.BR git\-status (1)
+
+.SH LICENSE
+.B git\-precheck
+is part of the
+.B git\-sonar
+project, made available under the terms of the
+.B MIT
+license.