Re: [PATCH] Automatically line wrap long commit messages.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <junkio@xxxxxxx> wrote:
> Shawn Pearce <spearce@xxxxxxxxxxx> writes:
> 
> > When using -m on the command line with git-commit it is not uncommon
> > for a long commit message to be entered without line terminators.
> > This creates commit objects whose messages are not readable in
> > 'git log' as the line runs off the screen.
> >
> > So instead reformat log messages if they are supplied on the
> > command line.
> >
> > Signed-off-by: Shawn O. Pearce <spearce@xxxxxxxxxxx>
> > ---
> >  This one might cause some problems for people.
> 
> I am already moderately negative on multiple -m so in the light
> of it this one looks totally unneeded.  You could do a number of
> things:
[snip]

OK.  Ignore both patches then.  Two negative votes in such a short
time suggests they are probably not generally accepted.  ;-)

> We probably should allow "commit -F -" to read from the standard
> input if we already don't, but that is about as far as I am
> willing to go at this moment.

We do.  So apparently the solution to my usage issue is:

	$ fmt -w 60 | git commit -F-
	This is my message.

	This is the body.  Etc....
	EOF

I'm thinking that's too much work for me.  Which means either I
learn to format my messages better in a single -m switch (as was
already suggested) or I just deal with git-commit popping open
$EDITOR anytime I want to commit something.  In which case then I
might as well also get a diff of what I am about to commit as part
of the temp file buffer.

Or I create my own little wrapper shell script which calls fmt.
Hmm, maybe that would be useful with alias and a promise to not
use ci as a core GIT command name:

	[alias "ci"]
		command=shawns-commit-wrapper

-- 
Shawn.
-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]