-
Notifications
You must be signed in to change notification settings - Fork 22
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
Improved subject line, plus signatures and such #18
Conversation
* Subject line - Mark only the offending characters as invalid.error or invalid.warning, all previous characters are not marked. - Mark the entire first line with a subject marker - Mark the line after the subject with a warning that it should be blank, as if you were typing an email * The Signed-off-by lines get marked as signatures, if present * All commit body lines are checked for line length to play nice with Github's recommended hard line wrap (can't find the reference, but here's one from DataMapper: http://datamapper.org/using-git) Signed-off-by: Tim Shadel <[email protected]>
* Subject highlighting is modeled after vim * File list highlighting is modeled after `git status` Signed-off-by: Tim Shadel <[email protected]>
Callout the branch that will be used for the commit. Uses standard language constructs (keyword, etc), subtyped with git-commit to allow normal themes to automatically update these colors without the need to provide default styles. Signed-off-by: Tim Shadel <[email protected]>
FWIW, I like having the whole line lit up as a warning; I use the char position in the editor to know how many chars to delete. |
Looks like it's also pulled my later work into this pull request. I've added some default styles for the subject and list of files changed, as well as called out the branch to which you'll be committing. |
@adamv, I can see that. I use the block of red to gauge how much I care about editing the subject -- small block no big deal, big block I actually edit it. It's the way other editors (like vim) highlight git commits, so I've emulated it here (used it for a long time, actually). I wonder if there's an easy way to tag the whole line with a marker in addition to what I've got that would allow for both preferences to be accommodated. |
I like the signed-off-by highlighting. Thoughts on the subject line? |
Update the subject markup to add a meta class around the entire subject line to indicate that it is in error or warning. This allows people to add the meta class to their 'invalid' theme scope and show the entire subject as invalid instead of just the offending part. Signed-off-by: Tim Shadel <[email protected]>
OK. This latest arrangement should allow for either approach to subject highlighting. What do you think @adamv? Does this help you out? :-) |
@jcf - I think this is ready to go. Let me know if you'd like any other changes before pulling it. |
Merged in to master. |
Mimic vim a bit by allowing the entire subject line to be highlighted, and only mark the extra chars as warning or errors. Highlight the Signed-off-by as well.