threads / discuss / 42258

Config for git-blame flags -w, -M, and -C?

Subject: Config for git-blame flags -w, -M, and -C?

## tl;dr

3 messages between May 7, 2016 and May 8, 2016.

replies: 2people: 2as markdown or json

Joe Lencioni· May 7, 2016, 17:03 UTC · lore

git-blame has a few options are useful when working with commits that only modify whitespace (-w), move code within the file (-M), or move code between files (-C). It would be nice if there was a way to configure git so these options could be enabled by default when running `git blame`.

I suppose this would also require the addition of the inverse options, or perhaps arguments for the options, to disable them if needed.

Thoughts?
/Joe
Junio C Hamano· May 8, 2016, 18:23 UTC · re: Joe Lencioni · lore

Re: Config for git-blame flags -w, -M, and -C?

Joe Lencioni <joe.lencioni@gmail.com> writes:
> Thoughts?

For end-user facing commands that are expected to be used by human typing on the keyboard, I'd recommend

	git config alias.bl "blame -w -M -C"
instead.
Joe Lencioni· May 8, 2016, 18:39 UTC · re: Junio C Hamano · lore

Re: Config for git-blame flags -w, -M, and -C?

> git config alias.bl "blame -w -M -C"

Indeed, that would do the trick when interacting with git directly. However, I am interested in something that would provide a consistent git blame across all tools that integrate with git, such as GUI tools and editor integrations like Fugitive.

← back to recent threads