git-fixup icon indicating copy to clipboard operation
git-fixup copied to clipboard

Configure the log format

Open LandonSchropp opened this issue 2 years ago • 1 comments

Thanks for creating such an awesome utility! I'm already enjoying using it. 🙂 Here's what my menu looks like so far:

Screen Shot 2022-05-14 at 3 09 08 PM

One thing I would love to change is the format of the commits in the log. I already have a nice git compact-log alias I wrote that displays the commits in a nice list.

Screen Shot 2022-05-14 at 3 20 38 PM

I'm sure everyone has their own preferences here. I personally really like the shortened commits, giving more room for the commit messages, and the colors, which make it easy to distinguish between different parts of the commit.

Rather than bikeshedding over the perfect message format, is it possible to configure it in git-fixup? Is there a configuration setting that could be added?

Here's my compact-log alias for reference.

  compact-log = log \
    --graph \
    --pretty=format:'%Cred%h %Cgreen(%cs)%Creset%Creset %s %C(bold blue)<%an>%C(yellow)%d%Creset' \
    --abbrev-commit

LandonSchropp avatar May 14 '22 20:05 LandonSchropp

Nothing like that currently exists but I think it should be reasonably easy to add an option here https://github.com/keis/git-fixup/blob/master/git-fixup#L60 A bit complicated by the $type in there but maybe it would be enough to make the trailing data after that configurable

keis avatar May 18 '22 18:05 keis