Re: commit summary, --pretty=short and other tools

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

 



On Mon, Sep 17, 2007 at 01:21:36PM +0200, Mike Hommey wrote:

> ... and I happen to not have done the "followed by a blank line" part.

If this isn't a published repo, you can fix it with filter-branch:

git filter-branch --msg-filter 'sed "1a
"'

> Now, git log --pretty=oneline (for instance), shows me the full commit
> message on one line, which is not really what I would expect...
> 
> On the other hand, and that's how I got trapped into this, gitweb and
> gitk only display the first line, be it followed by a blank line or not.

This was changed recently for git-log and company, but gitk and gitweb
have not followed suit.  Traditionally, the behavior was to take the
first line. This was changed in 4234a761 to take the first paragraph.
The rationale was that people without the nice one-line summaries are
typically importing old histories, and the paragraph makes a much more
sensible summary (as opposed to cutting off the summary in
mid-sentence).

> So, IMHO, there would be 2 solutions:
> - either change --pretty=oneline,short and other similar things to take
>   only the first line and change the git-commit manpage (and whenever
>   else this might be written)
> - or change gitweb, gitk and any other tool that would only take the
>   first line so that it takes the same summary as --pretty=oneline.
> 
> What do you think ?

It depends on whether people like the new behavior. I think it is more
sensible in every case _except_ the one you have mentioned, but your
case is hopefully somewhat rare (though it just made it to the public in
1.5.3, so yours might be the first of many comments).

I do agree that it makes sense for all of the tools to be consistent.

-Peff
-
To unsubscribe from this list: 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]

  Powered by Linux