Re: [PATCH] t4202 (log): add failing test for log with subtree
- From
Ramkumar Ramachandra <artagnon@gmail.com>
- Date
- Apr 22, 2013, 12:54 UTC
- Message-ID
- <CALkWK0kS4Y-ERMn54J7O+kiQwNNGxqx1a_31y2JAO9UjeVZ7MQ@mail.gmail.com>
- In-Reply-To
- <CALkWK0kaYeOt3pdjae8rXPiPBWnfrAPOoOaQ73m2qktVxvoeTw@mail.gmail.com>
Ramkumar Ramachandra wrote:
Show 9 quoted lines
> Unless there is a commit with the following diff > (with heuristically similar content), I don't see how --follow can > work: > > diff --git a/README b/README > deleted file mode 100644 > > diff --git a/subproject/README b/subproject/README > new file mode 100644
In other words, git diff-tree HEAD^2 HEAD is absolute nonsense in the subtree case.
Let me outline how I think --follow works: A 'git log --follow foo' executes a diff-tree with historical trees until it finds one that removes (or adds, depending on which way you look at it) the 'foo' entry. It then inspects all the trees in the corresponding commit for a blob that is heuristically similar to the HEAD:foo blob, and follows it.
How can you logically extend this concept to handle my case?