On Wed, Sep 4, 2019 at 10:30 PM Eric Sunshine <sunsh...@sunshineco.com> wrote:
> On Wed, Sep 4, 2019 at 4:10 PM Bert Wesarg <bert.wes...@googlemail.com> wrote:
> > The commit message widget does not wrap the next and has a configurable
> s/next/text/


> > fixed width to avoid creating too wide commit messages. Though this was
> > only enforced in the GUI. Now we also check the commit message at commit
> > time for long lines and ask the author for confirmation if it exceeds the
> > configured line length.
> Hmm, more confirmation dialogs tend to mean more annoyance for users,
> especially considering that the line length limit is a
> project-specific _policy_ (so this has the potential to annoy a lot of
> people), and also because there often are legitimate reasons for
> exceeding the limit (such as pasting in URLs).

these people did not saw the entered text anyway. they would have
needed to change the option (default to 75 characters) to see what
they have typed. which could have been garbage to begin with.

> As an alternative to a confirmation dialog, how about instead adding a
> _warning_ message (perhaps with red text) on the window itself
> alongside to the commit message field (below or above it or
> something)? Is that something that could be triggered by a text widget
> callback?

How about a horizontal scrollbar? This indicates pretty conveniently
and in a standard visual way, that there is more text to the side ;-)

> > Signed-off-by: Bert Wesarg <bert.wes...@googlemail.com>
> > ---
> > diff --git a/lib/commit.tcl b/lib/commit.tcl
> > @@ -215,6 +215,16 @@ A good commit message has the following format:
> > +       if {[tcl::mathfunc::max {*}[lmap x [split $msg "\n"] {string length 
> > $x}]] >= $repo_config(gui.commitmsgwidth) \
> Does this take TABs into account?

probably not. Does git expands tabs if it wrap lines (git shortlog's -w option)?

Reply via email to