Re: [PATCH] t4202 (log): add failing test for log with subtree
- From
Thomas Rast <trast@inf.ethz.ch>
- Date
- Apr 22, 2013, 12:17 UTC
- Message-ID
- <87r4i2pxo5.fsf@linux-k42r.v.cablecom.net>
- In-Reply-To
- <vpqa9oqpxx7.fsf@grenoble-inp.fr>
Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
Show 12 quoted lines
> Ramkumar Ramachandra <artagnon@gmail.com> writes: > >> was checking it out: a 'git log <pathspec>', when referring to a file >> inside the subtree, doesn't work as expected: it only displays the >> HEAD commit. > > This is somehow expected: the subtree merge changed the filename during > merge (it is subtree/file.txt after the merge, and just file.txt > before), so "git log" without --follow just considers the file appeared. > > OTOH, I think this is a known limitation of "git log --follow" that it > does not follow renames done by subtree merges.
Umm, it should follow the rename. The big limitation is that it is unable to follow more than one name at a time, so if the file exists on both sides of the subtree merge, it will follow the original name. And that's the common case; only the very first merge of the subtree has the files only on one side.
You can see this by comparing
git log --oneline --follow gitk-git/gitk
with
git log --oneline -- gitk gitk-git/gitk
--
Thomas Rast
trast@{inf,student}.ethz.ch