[Top][All Lists]

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

Re: vc-annotate / magit-blame considerations

From: Yuri D'Elia
Subject: Re: vc-annotate / magit-blame considerations
Date: Tue, 28 Apr 2015 16:12:04 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.6.0

On 04/28/2015 03:28 PM, Jacob Gerlach wrote:
>> I couldn't find an easy way to customize the annotation. It would make
>> sense to me to be able to filter the available info using a function
>> and/or a format. The current option of hiding all annotations is not
>> terribly useful, since you clearly want *some* annotation if you're
>> using vc-annotate in the first place.
> It's looks like the format is hard coded in vc-git-annotate-command.
> If you can find a set of arguments to git blame (for example, -s to
> hide author and date or --abbrev=n to truncate the SHA1) that produces
> the format you'd like, you could redefine this function with the
> arguments you prefer. It's a hack, but it does help to make lines in
> the annotate buffer a bit shorter. Unfortunately, the date is parsed
> to fontify the annotate buffer, so you can't use -s if you want to
> keep the color coding.

I actually disabled color-coding. First, I feel it should have been done
on the annotation, not on the buffer. Font-locking on the buffer is too
important. On top of that, I also didn't find age coloring useful. I
customized a bit the ranges, but in practice for any mature project the
age of the changeset is irrelevant. Color-coding the changeset id using
a high-contrast palette is much more useful, as you want to see lines
part of the same commit even when they're not contiguous.

> There is probably a better solution using invisibility specs, but it
> looks like that might imply some deep changes to the entire vc system.

I was looking a bit into it, but yeah, it looks like that either
changing magit-blame or changing vc-annotate requires non-trivial rework.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]