Re: What's the difference between `git show branch:file | diff -u - file` vs `git diff branch file`?
- From
Marat Radchenko <marat@slonopotamus.org>
- Date
- Aug 23, 2011, 18:21 UTC
- Message-ID
- <loom.20110823T201645-980@post.gmane.org>
- In-Reply-To
- <7vk4a4rqvb.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster <at> pobox.com> writes:
> Not necessarily, especially when pathspec is given like the original post, > i.e. "git diff $tree_ish -- $path". We would need to open tree objects > that lead to the leaf of the $path and a blob, but other objects won't be > needed.
And git show branch:path already has that code.