Skip to content
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

Merged
4 commits merged into from
Dec 15, 2010
Merged

Conversation

timshadel
Copy link

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.

* 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]>
@adamv
Copy link

adamv commented Dec 8, 2010

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.

@timshadel
Copy link
Author

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.

@timshadel
Copy link
Author

@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.

@jcf
Copy link
Owner

jcf commented Dec 9, 2010

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]>
@timshadel
Copy link
Author

OK. This latest arrangement should allow for either approach to subject highlighting. What do you think @adamv? Does this help you out? :-)

@timshadel
Copy link
Author

@jcf - I think this is ready to go. Let me know if you'd like any other changes before pulling it.

@jcf
Copy link
Owner

jcf commented Dec 15, 2010

Merged in to master.

This pull request was closed.
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

Successfully merging this pull request may close these issues.

4 participants