git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Pratyush Yadav <me@yadavpratyush.com>
To: Bert Wesarg <bert.wesarg@googlemail.com>
Cc: Eric Sunshine <sunshine@sunshineco.com>,
	Git List <git@vger.kernel.org>,
	Birger Skogeng Pedersen <birger.sp@gmail.com>
Subject: Re: [PATCH 1/2] git-gui: warn if the commit message contains lines longer than the set limit
Date: Thu, 5 Sep 2019 04:18:21 +0530	[thread overview]
Message-ID: <20190904224821.mgh4srhc22grkraz@yadavpratyush.com> (raw)
In-Reply-To: <CAKPyHN3=hh7DCoyEKB9DOf=t=v=Y1bX1xVx9r6Lxy=WQb9JC-A@mail.gmail.com>

On 04/09/19 10:43PM, Bert Wesarg wrote:
[snip]
> > > 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.

Not true in my experience. Sure, no scrollbar appears, but the view of 
the textbox still scrolls when I type in a long line. I can go back to 
seeing the start of the line by moving with the arrow keys.

The point being, you _can_ see what you typed. Do you not get this 
behaviour in Windows (or whatever platform you use)? Maybe that is a 
Tcl/Tk problem?

> > 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?

I'll chime in with what I think would be a great solution: auto word 
wrapping. This way, the users can set the text width, and not have to 
worry about manually formatting it. Long "words" like URLs would still 
get to be on one line, and we avoid showing annoying dialogs.

-- 
Regards,
Pratyush Yadav

  reply	other threads:[~2019-09-04 22:48 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-04 20:10 [PATCH 1/2] git-gui: warn if the commit message contains lines longer than the set limit Bert Wesarg
2019-09-04 20:10 ` [PATCH 2/2] git-gui: add horizontal scrollbar to commit buffer Bert Wesarg
2019-09-04 20:31   ` Eric Sunshine
2019-09-04 20:46     ` Bert Wesarg
2019-09-10 20:28   ` Pratyush Yadav
2019-09-12 19:10     ` Bert Wesarg
2019-09-04 20:29 ` [PATCH 1/2] git-gui: warn if the commit message contains lines longer than the set limit Eric Sunshine
2019-09-04 20:43   ` Bert Wesarg
2019-09-04 22:48     ` Pratyush Yadav [this message]
2019-09-05  6:48       ` Birger Skogeng Pedersen
2019-09-05 17:46         ` Bert Wesarg
2019-09-06 14:08           ` Birger Skogeng Pedersen
2019-09-06 20:07             ` Philip Oakley
2019-09-10  8:04               ` David Aguilar
2019-09-10 19:42                 ` Pratyush Yadav
2019-09-05  6:21     ` Johannes Sixt
2019-09-05 17:43       ` Bert Wesarg
2019-09-10 16:50 ` Johannes Sixt
2019-09-12 19:26   ` Bert Wesarg
2019-09-10 20:34 ` Pratyush Yadav
2019-09-12 19:13   ` Bert Wesarg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190904224821.mgh4srhc22grkraz@yadavpratyush.com \
    --to=me@yadavpratyush.com \
    --cc=bert.wesarg@googlemail.com \
    --cc=birger.sp@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=sunshine@sunshineco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).