Skip to content

Prompt for commit message #76

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Notarin opened this issue May 10, 2025 · 0 comments
Open

Prompt for commit message #76

Notarin opened this issue May 10, 2025 · 0 comments

Comments

@Notarin
Copy link

Notarin commented May 10, 2025

I strongly believe in semantic correctness.
git commits are supposed to be single purposed, useful, and have a descriptive and relevant message associated with it.
The current lack of ability to configure the plugin to prompt for the message is leaving me to make my commits outside the editor, in the CLI.
As it stands, this is no better than an fs backup with rollback capabilities.

For context below, there isn't an "official" standard set by anyone that's concrete, but the rather universally accepted standard is the following:

  • A subject line that is less than 80 chars that gives a quick insight to the purpose and contents of the commit, while being identifiable from the other commit messages.
  • An empty second line, when there is the following section:
  • Following the empty second line, when necessary, a section of text giving further details into the purpose and contents of the commit, as well as other useful commentary, the number of lines being arbitrary in length, each line being 80 chars or less.

As for prompting the user, there are two ways most git programs allow users to enter a commit message, they consist of:

  • Providing a simple multi-line text input field and leave it to the user to format their entry to be compliant, or ignore compliance should they wish.
  • Providing a single-line text input field labeled "Subject", and following it, a multi-line text text input field labeled "Description".
    • The utility then joins the two string together with two newlines, resulting in the second line being empty and compliant.
    • Some utilities warn the user in some fashion if any line lengths grow to be non-compliant.

I personally like the latter, and I am unopinionated if warnings/notices should be implemented for line length being exceeded.

As much as I despise typescript, I might look at making a PR. cough probably after making a flake first lmao cough

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant