git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 3/4] filter-branch: fix --prune-empty on parentless commits

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 3, 2017, 20:43 UTC
Message-ID
<xmqq8tom8526.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20170303075535.rxij4knd7d4ayfev@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> The change to filter-branch itself looks obviously correct. The only
> objectionable thing I noticed in the test additions is that the early
> ones should be marked test_expect_failure until the fix from 3/4 flips
> them to "success". Otherwise it breaks bisectability.

I'll squash in the necessary changes to flip between expect_success and expect_failure in the appropriate places and re-queue on 'pu'.

Thanks.
commit 07cac4a5fdfeeb3c1c8385e222100d575a4460b0
Author: Junio C Hamano <gitster@pobox.com>
Date:   Fri Mar 3 11:41:36 2017 -0800
    fixup! t7003: ensure --prune-empty can prune root commit
diff --git a/t/t7003-filter-branch.sh b/t/t7003-filter-branch.sh
index 2dfe462501..45372a1cba 100755
--- a/t/t7003-filter-branch.sh
+++ b/t/t7003-filter-branch.sh
@@ -362,7 +362,7 @@ test_expect_success 'prune empty works even without index/tree filters' '
 	test_cmp expect actual
 '
 
-test_expect_success '--prune-empty is able to prune root commit' '
+test_expect_failure '--prune-empty is able to prune root commit' '
 	git rev-list branch-no-a >expect &&
 	git branch testing H &&
 	git filter-branch -f --prune-empty --index-filter "git update-index --remove A.t" testing &&


commit 562ed048c681686426ca95e0e550378b48aa4852
Author: Junio C Hamano <gitster@pobox.com>
Date:   Fri Mar 3 12:11:25 2017 -0800

    fixup! t7003: ensure --prune-empty removes entire branch when applicable

diff --git a/t/t7003-filter-branch.sh b/t/t7003-filter-branch.sh
index a774a8e4b3..40526d1716 100755
--- a/t/t7003-filter-branch.sh
+++ b/t/t7003-filter-branch.sh
@@ -371,7 +371,7 @@ test_expect_failure '--prune-empty is able to prune root commit' '
 	test_cmp expect actual
 '
 
-test_expect_success '--prune-empty is able to prune entire branch' '
+test_expect_failure '--prune-empty is able to prune entire branch' '
 	git branch prune-entire B &&
 	git filter-branch -f --prune-empty --index-filter "git update-index --remove A.t B.t" prune-entire &&
 	test_path_is_missing .git/refs/heads/prune-entire &&


commit 520534c4035a13c54229dab0320e745d18635ef3
Author: Junio C Hamano <gitster@pobox.com>
Date:   Fri Mar 3 12:39:58 2017 -0800

    fixup! filter-branch: fix --prune-empty on parentless commits

diff --git a/t/t7003-filter-branch.sh b/t/t7003-filter-branch.sh
index 40526d1716..7cb60799be 100755
--- a/t/t7003-filter-branch.sh
+++ b/t/t7003-filter-branch.sh
@@ -362,7 +362,7 @@ test_expect_success 'prune empty works even without index/tree filters' '
 	test_cmp expect actual
 '
 
-test_expect_failure '--prune-empty is able to prune root commit' '
+test_expect_success '--prune-empty is able to prune root commit' '
 	git rev-list branch-no-a >expect &&
 	git branch testing H &&
 	git filter-branch -f --prune-empty --index-filter "git update-index --remove A.t" testing &&
@@ -371,7 +371,7 @@ test_expect_failure '--prune-empty is able to prune root commit' '
 	test_cmp expect actual
 '
 
-test_expect_failure '--prune-empty is able to prune entire branch' '
+test_expect_success '--prune-empty is able to prune entire branch' '
 	git branch prune-entire B &&
 	git filter-branch -f --prune-empty --index-filter "git update-index --remove A.t B.t" prune-entire &&
 	test_path_is_missing .git/refs/heads/prune-entire &&
Previous: Devin J. PohlyNext: Devin J. Pohly
Message 12 of 15 in “t7003: ensure --prune-empty can prune root commit”
  1. 1/4 t7003: ensure --prune-empty can prune root commitDevin J. Pohly, Feb 23, 2017
  2. 2/4 t7003: ensure --prune-empty removes entire branch when applicableDevin J. Pohly, Feb 23, 2017
  3. 3/4 filter-branch: fix --prune-empty on parentless commitsDevin J. Pohly, Feb 23, 2017
  4. Junio C HamanoFeb 23, 2017
  5. Devin J. PohlyFeb 23, 2017
  6. Junio C HamanoMar 2, 2017
  7. Devin J. PohlyMar 2, 2017
  8. Junio C HamanoMar 2, 2017
  9. Jacob KellerMar 2, 2017
  10. Jeff KingMar 3, 2017
  11. Devin J. PohlyMar 3, 2017
  12. Junio C HamanoMar 3, 2017
  13. 4/4 p7000: add test for filter-branch with --prune-emptyDevin J. Pohly, Feb 23, 2017
  14. Jeff KingMar 3, 2017
  15. Devin J. PohlyMar 3, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.