Git development
 help / color / mirror / Atom feed
* Bug? Files are losing history after subtree merge
@ 2013-10-02 19:20 Ralf Thielow
  2013-10-02 19:42 ` Matthieu Moy
  0 siblings, 1 reply; 5+ messages in thread
From: Ralf Thielow @ 2013-10-02 19:20 UTC (permalink / raw)
  To: git; +Cc: Ralf Thielow

Hi,

recently I did a merge where a complete repo shall be
merged into a specific directory of another repo. I
tried both the "subtree" merge strategy and the option
"-Xsubtree=<dir>" of "recursive". I noticed that in both
cases somehow the history of single files were lost
during these merges (with history I mean 'git log <file>'
and 'git log --follow <file>'). I've worked around this
by merging without 'subtree' and moving the dirs/files
manually. In this case the file history was there.

I've added a test case below for that behaviour. It doesn't
catch "-S recursive -Xsubtree=<dir>" but it should show
the issue (hopefully:).

Ralf
---
 t/t6029-merge-subtree.sh | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/t/t6029-merge-subtree.sh b/t/t6029-merge-subtree.sh
index 73fc240..e9a97d7 100755
--- a/t/t6029-merge-subtree.sh
+++ b/t/t6029-merge-subtree.sh
@@ -61,6 +61,14 @@ test_expect_success 'initial merge' '
 	test_cmp expected actual
 '
 
+test_expect_failure 'file keeps history after subtree merge' '
+	cd ../git-gui &&
+	git log --follow git-gui.sh >../git/expected &&
+	cd ../git &&
+	git log --follow git-gui/git-gui.sh >actual &&
+	test_cmp expected actual
+'
+
 test_expect_success 'merge update' '
 	cd ../git-gui &&
 	echo git-gui2 > git-gui.sh &&
-- 
1.8.4.652.g0d6e0ce

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-10-02 20:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-02 19:20 Bug? Files are losing history after subtree merge Ralf Thielow
2013-10-02 19:42 ` Matthieu Moy
2013-10-02 20:10   ` Ralf Thielow
     [not found]   ` <CAN0XMO+y3Cwsz5LwbmzHBe31Rf-RwMykynLmvmqUsxY8f+1dsQ@mail.gmail.com>
2013-10-02 20:21     ` Matthieu Moy
2013-10-02 20:44       ` Ralf Thielow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox