Add toggle for commit title overflow #125

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

Contributor
vivien commented Mar 12, 2013

Hi Jonas,

This PR is the v3 of #122, which now implements the new title-overflow option as a boolint.
That means, we can set the title overflow highlighting like this:

set title-overflow = yes # defaults to 50 character
set title-overflow = false # disables highlighting
set title-overflow = 72 # enables and sets the limit to 72 character

Cheers,
Vivien

@vivien vivien main: add toggle for commit title overflow
Many developers and tools use the Git convention for commit titles,
as discussed in the git-commit(1) man page:

  Though not required, it's a good idea to begin the commit message with
  a single short (less than 50 character) line summarizing the change

This patch adds the ability to highlight text exceeding a specified
width in commit titles, through a "title-overflow" option.

As a boolean, it enables/disables the highlighting, with a default value
of 50. As a int, it enables and uses the value as the maximum width for
a title to be considered short.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
f4fc24d
Owner
vivien commented on tig.c in f4fc24d Mar 12, 2013

Note that here I keep the trailing backslash, as it's correct due to the following empty line. It will make next commits/reverts easier.

Owner
jonas commented Mar 30, 2013

Merged, thanks. FWIW, I also refactored your patch to support highlighting in the diff view.

@jonas jonas closed this Mar 30, 2013
Contributor
vivien commented Mar 31, 2013

Thanks for merging and for the followup work. Highlight in the diff view is something I wanted too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment