Expand description
User-facing diagnostics of the commit-only transform. What: The user-facing diagnostics of the commit-only transform. Why: Each message names the rejected form and every valid way forward; keeping the text apart from the decision keeps both files readable.
In TS you’d write (pseudocode):
// const NO_PATHSPEC_MESSAGE = 'cli-git: git commit requires an explicit pathspec ...';Constants§
- ALL_
FLAG_ MESSAGE - Diagnostic for
-a/--all, which stages tracked modifications implicitly. - NO_
PATHSPEC_ MESSAGE - Diagnostic for a commit with no pathspec source and no mode that permits a pathless only-commit.
Functions§
- ignored_
index_ message - What:
Build the diagnostic for a pathless
--amend/--allow-emptycommit over a dirty index.&strborrows the flag text;Stringis the owned result. Why: An injected--onlywould commitHEAD’s existing tree and leave the staged changes staged without any warning from Git.