Subject: Re: [PATCH RFC 0/5] Introduce git-blame-tree(1) command

From: Junio C Hamano <[email-masked]>
Date: Thu, 08 May 2025 07:26:28 -0700

Marc Branchaud <[email-masked]> writes:

> This distinction brings up a wrinkle in my proposed DWIMery: should
> 	git blame path/to/file
> show the annotated blamed lines of the file, or simply display the
> last commit that changed the file?

I thought you switch to blame-at-the-file-level only when you are
given a directory (or a tree)?  "git blame path/to/file" has ALWAYS
done "blame these lines that appear in this file", and cannot change.

Of course you can say "git blame path/to/ | grep file"; as you said
yourself,

> 	git log -1 path/to/file

is so obvious, we do not need to introduce yet another way to get to
the same information, I think.

> It also occurs to me that
> 	git blame path/to/directory
> might need a way to toggle recursion.  I suggest recursion be off by
> default.

I do not have strong opinion on this part; I've somehow assumed
while reading your message that you wanted it to always recurse
(like `git ls-files` does) and I thought it made sense, but not
recursing and just showing a single level (like `git ls-tree` does)
with an option to make it recurse is certainly a possibility.

Thanks.