git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Add test for filter-branch on a subdirectory that's been added and deleted and re-added
@ 2008-03-08 11:50 Kevin Ballard
  2008-03-08 11:52 ` Kevin Ballard
  2008-03-08 18:41 ` Junio C Hamano
  0 siblings, 2 replies; 8+ messages in thread
From: Kevin Ballard @ 2008-03-08 11:50 UTC (permalink / raw)
  To: git, Junio C Hamano; +Cc: Kevin Ballard

Add a currently-failing test for the case when git-filter-branch
is run with the --subdirectory-filter referencing a folder that
has been added, deleted, and re-added. Such an action should work,
but as this test shows it ends up blowing up.
---
 t/t7003-filter-branch.sh |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/t/t7003-filter-branch.sh b/t/t7003-filter-branch.sh
index 868babc..933157b 100755
--- a/t/t7003-filter-branch.sh
+++ b/t/t7003-filter-branch.sh
@@ -179,4 +179,17 @@ test_expect_success 'Name needing quotes' '
 
 '
 
+test_expect_success 'Subdirectory filter on folder with non-contiguous history' '
+	mkdir foo &&
+	touch foo/bar &&
+	git add foo &&
+	git commit -m "Adding foo" &&
+	git rm -r foo &&
+	git commit -m "Removing foo" &&
+	mkdir foo &&
+	touch foo/bar &&
+	git commit -m "Re-adding foo" &&
+	git filter-branch --subdirectory-filter foo
+'
+
 test_done
-- 
1.5.4.3.487.g5a92


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [PATCH] Add test for filter-branch on a subdirectory that's been added and deleted and re-added
@ 2008-02-25 19:45 Kevin Ballard
  0 siblings, 0 replies; 8+ messages in thread
From: Kevin Ballard @ 2008-02-25 19:45 UTC (permalink / raw)
  To: git, Junio C Hamano; +Cc: Kevin Ballard

---
 t/t7003-filter-branch.sh |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/t/t7003-filter-branch.sh b/t/t7003-filter-branch.sh
index 868babc..9972343 100755
--- a/t/t7003-filter-branch.sh
+++ b/t/t7003-filter-branch.sh
@@ -179,4 +179,17 @@ test_expect_success 'Name needing quotes' '
 
 '
 
+test_expect_success 'Subdirectory filter on non-contiguous folder' '
+	mkdir foo &&
+	touch foo/bar &&
+	git add foo &&
+	git commit -m "Adding foo" &&
+	git rm -r foo &&
+	git commit -m "Removing foo" &&
+	mkdir foo &&
+	touch foo/bar &&
+	git commit -m "Re-adding foo" &&
+	git filter-branch --subdirectory-filter foo
+'
+
 test_done
-- 
1.5.4.3.222.gb0bf5


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

end of thread, other threads:[~2008-03-08 20:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-08 11:50 [PATCH] Add test for filter-branch on a subdirectory that's been added and deleted and re-added Kevin Ballard
2008-03-08 11:52 ` Kevin Ballard
2008-03-08 18:41 ` Junio C Hamano
2008-03-08 18:45   ` Kevin Ballard
2008-03-08 20:08     ` Re* " Junio C Hamano
2008-03-08 20:25     ` Junio C Hamano
2008-03-08 20:39       ` Kevin Ballard
  -- strict thread matches above, loose matches on Subject: below --
2008-02-25 19:45 Kevin Ballard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).