Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] t4202 (log): add failing test for log with subtree

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:56:57

Ramkumar Ramachandra [off-list ref] writes:
Meanwhile, you're evading the issue of assuming that all trees are
read into /, and are really representing the same project's history,
while this is not the case.
This is fundamenally how Git works. Git works with commit objects, each
commit object points to a tree object that represent "/" at this commit.

When you do a subtree merge, you include the tree that was in "/" in a
subtree of the master project. Files used to exist as /file, and now
exist as /subtree/file. There is nothing recording that the new
/subtree/file comes from /file in its second parent. Call this a
renaming or not, but "git log subtree/file" won't show you changes
touching "/file" by default, and this is the case for the history of the
subproject you are merging.

A subtree merge is really a rename of the subproject's file plus a
merge, done in the same commit. Try doing something like

mkdir -p subproject
git mv * subproject/
git commit

in your subproject before doing a merge, you'll get the same result,
except there will be one more commit.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help