Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » commit gui reformats modified hard-wrapped text badly(amended commit comment is badly formatted if hard-wrap is enabled)
commit gui reformats modified hard-wrapped text badly [message #730004] Tue, 27 September 2011 13:05 Go to next message
R Shapiro is currently offline R ShapiroFriend
Messages: 386
Registered: June 2011
Senior Member
When the commit message is amended by inserting text, the existing text that gets moved to the next line by the hard wrapper ends up with each word on a line by itself. So if the first two lines of my original message looks like this:

Read manifests and missions files into minimal objects rather than
blah blah blah

and I then insert "some inserted text" after "minimal", I end up with:

Read manifests and missions files into minimal some inserted text
objects
rather
than
blah blah blah

I then have to clean up all these extra line breaks manually, by deleting them one at a time. That doesn't seem right. I think either the reformatter in this case should do the right thing, only adding line breaks where needed, or we need a 'reformat' toolbar item that will hard-wrap all the text after editing is complete.

This problem is specific to hard-wrap -- soft wrapping works more reasonably.
Re: commit gui reformats modified hard-wrapped text badly [message #730126 is a reply to message #730004] Tue, 27 September 2011 16:47 Go to previous messageGo to next message
R Shapiro is currently offline R ShapiroFriend
Messages: 386
Registered: June 2011
Senior Member
Forgot to mention:

Egit version: 1.2.0.201109261000 (but this issue has been around at least since 1.0, maybe longer)
Platform: Mac OS X 10.7.1
Re: commit gui reformats modified hard-wrapped text badly [message #730375 is a reply to message #730126] Wed, 28 September 2011 09:29 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1268
Registered: July 2009
Senior Member
Could you file a bug for this problem ?
Re: commit gui reformats modified hard-wrapped text badly [message #730674 is a reply to message #730126] Wed, 28 September 2011 20:33 Go to previous messageGo to next message
Robin Rosenberg is currently offline Robin RosenbergFriend
Messages: 332
Registered: July 2009
Senior Member
R Shapiro skrev 2011-09-27 18.47:
> Forgot to mention:
>
> Egit version: 1.2.0.201109261000 (but this issue has been around at
> least since 1.0, maybe longer)
> Platform: Mac OS X 10.7.1
>

I've been looking into it in order to get something better, based
on the same heuristis as the commit message viewer uses to decide
on whether to reflow a line or not. It seems like it might work,
but I'm still not sure one wants the hard wrap while typing. Maybe it is
better handled as something we do explicitly or when focus is lost, or
(automatically) when starting a new paragraph, or some other criteria.

-- robin
Re: commit gui reformats modified hard-wrapped text badly [message #730675 is a reply to message #730375] Wed, 28 September 2011 20:36 Go to previous messageGo to next message
Robin Rosenberg is currently offline Robin RosenbergFriend
Messages: 332
Registered: July 2009
Senior Member
Matthias Sohn skrev 2011-09-28 11.29:
> Could you file a bug for this problem ?

There is one: https://bugs.eclipse.org/bugs/show_bug.cgi?id=356925

-- robin
Re: commit gui reformats modified hard-wrapped text badly [message #731315 is a reply to message #730675] Fri, 30 September 2011 15:55 Go to previous messageGo to next message
R Shapiro is currently offline R ShapiroFriend
Messages: 386
Registered: June 2011
Senior Member
One simple option might be a 'format' toolbar item that would re-wrap on demand, analogous to the 'Source -> Format' command in editor views.

Re: commit gui reformats modified hard-wrapped text badly [message #731373 is a reply to message #731315] Fri, 30 September 2011 18:50 Go to previous messageGo to next message
prusswan is currently offline prusswanFriend
Messages: 3
Registered: September 2011
Junior Member
What is the intended purpose of hard-wrap anyway? I intend to update my commits a lot on my local branch, so having to backspace my previous commit message while updating it does not make much sense, until I realize there is a setting for it.
Re: commit gui reformats modified hard-wrapped text badly [message #748196 is a reply to message #731373] Mon, 24 October 2011 14:53 Go to previous message
R Shapiro is currently offline R ShapiroFriend
Messages: 386
Registered: June 2011
Senior Member
I'm not sure about this but I think the default behavior of the 'git log' command will not display comment text beyond the standard hard-wrap length
Previous Topic:unable to change SSH2 on Ubuntu
Next Topic:Cannot get EGit to ignore generated files
Goto Forum:
  


Current Time: Tue Apr 16 11:48:52 GMT 2024

Powered by FUDForum. Page generated in 0.07618 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top