diff mbox series

git-filter-repo v2.29.0, was Re: [ANNOUNCE] Git v2.29.0

Message ID nycvar.QRO.7.76.6.2010211630010.56@tvgsbejvaqbjf.bet (mailing list archive)
State New, archived
Headers show
Series git-filter-repo v2.29.0, was Re: [ANNOUNCE] Git v2.29.0 | expand

Commit Message

Johannes Schindelin Oct. 21, 2020, 2:46 p.m. UTC
Hi Elijah,

On Mon, 19 Oct 2020, Elijah Newren wrote:

> git-filter-repo can also be installed via a variety of package managers
> across Windows, Mac OS, or Linux (and maybe others)[1].

In the few attempts I ran to verify that this indeed works on Windows, I
always stumbled over the tests that require "funny" characters in the file
names. However, it seems that at least a couple later test cases rely on
side effects of those test cases that require those characters, so I never
managed to get this to work. Here is my work-that-is-not-even-in-progress:

-- snip --
-- snap --

(There are two unrelated fixes in there, to be sure.)

I wonder whether there would be a chance that you and I could combine
efforts so that git-filter-repo is MEAOW (Most Enjoyable Also On Windows)?
Maybe starting with the addition of a GitHub workflow that uses Git for
Windows' SDK via something along the lines of Git's `windows-build` steps:
https://github.com/git/git/blob/v2.29.0/.github/workflows/main.yml#L81-L95
(although it would need the full `git-sdk-64` artifact of
https://dev.azure.com/git-for-windows/git/_build?definitionId=29&_a=summary
because it requires Python, which git-sdk-64-minimal excludes)?

Ciao,
Dscho

Comments

Elijah Newren Oct. 21, 2020, 6:04 p.m. UTC | #1
Hi Dscho,

On Wed, Oct 21, 2020 at 7:46 AM Johannes Schindelin
<Johannes.Schindelin@gmx.de> wrote:
>
> Hi Elijah,
>
> On Mon, 19 Oct 2020, Elijah Newren wrote:
>
> > git-filter-repo can also be installed via a variety of package managers
> > across Windows, Mac OS, or Linux (and maybe others)[1].
>
> In the few attempts I ran to verify that this indeed works on Windows, I
> always stumbled over the tests that require "funny" characters in the file
> names. However, it seems that at least a couple later test cases rely on
> side effects of those test cases that require those characters, so I never
> managed to get this to work. Here is my work-that-is-not-even-in-progress:
>
> -- snip --
> diff --git a/git-filter-repo b/git-filter-repo
> index ac039ec..7e2a534 100755
> --- a/git-filter-repo
> +++ b/git-filter-repo
> @@ -1,4 +1,4 @@
> -#!/usr/bin/env python3
> +#!/usr/bin/env python
>
>  """
>  git-filter-repo filters git repositories, similar to git filter-branch, BFG
> diff --git a/t/t9390-filter-repo.sh b/t/t9390-filter-repo.sh
> index 14bdeaa..d7f9f1f 100755
> --- a/t/t9390-filter-repo.sh
> +++ b/t/t9390-filter-repo.sh
> @@ -298,7 +298,7 @@ setup_metasyntactic_repo() {
>         )
>  }
>
> -test_expect_success '--tag-rename' '
> +test_expect_success FUNNYNAMES '--tag-rename' '
>         setup_metasyntactic_repo &&
>         (
>                 git clone file://"$(pwd)"/metasyntactic tag_rename &&
> @@ -317,7 +317,7 @@ test_expect_success '--tag-rename' '
>         )
>  '
>
> -test_expect_success '--subdirectory-filter' '
> +test_expect_success FUNNYNAMES '--subdirectory-filter' '
>         setup_metasyntactic_repo &&
>         (
>                 git clone file://"$(pwd)"/metasyntactic subdir_filter &&
> @@ -336,7 +336,7 @@ test_expect_success '--subdirectory-filter' '
>         )
>  '
>
> -test_expect_success '--subdirectory-filter with trailing slash' '
> +test_expect_success FUNNYNAMES '--subdirectory-filter with trailing slash' '
>         setup_metasyntactic_repo &&
>         (
>                 git clone file://"$(pwd)"/metasyntactic subdir_filter_2 &&
> @@ -355,7 +355,7 @@ test_expect_success '--subdirectory-filter with trailing slash' '
>         )
>  '
>
> -test_expect_success '--to-subdirectory-filter' '
> +test_expect_success FUNNYNAMES '--to-subdirectory-filter' '
>         setup_metasyntactic_repo &&
>         (
>                 git clone file://"$(pwd)"/metasyntactic to_subdir_filter &&
> @@ -375,7 +375,7 @@ test_expect_success '--to-subdirectory-filter' '
>         )
>  '
>
> -test_expect_success '--use-base-name' '
> +test_expect_success FUNNYNAMES '--use-base-name' '
>         setup_metasyntactic_repo &&
>         (
>                 git clone file://"$(pwd)"/metasyntactic use_base_name &&
> @@ -394,7 +394,7 @@ test_expect_success '--use-base-name' '
>         )
>  '
>
> -test_expect_success 'refs/replace/ to skip a parent' '
> +test_expect_success FUNNYNAMES 'refs/replace/ to skip a parent' '
>         setup_metasyntactic_repo &&
>         (
>                 git clone file://"$(pwd)"/metasyntactic replace_skip_ref &&
> @@ -416,7 +416,7 @@ test_expect_success 'refs/replace/ to skip a parent' '
>         )
>  '
>
> -test_expect_success 'refs/replace/ to add more initial history' '
> +test_expect_success FUNNYNAMES 'refs/replace/ to add more initial history' '
>         setup_metasyntactic_repo &&
>         (
>                 git clone file://"$(pwd)"/metasyntactic replace_add_refs &&
> @@ -451,7 +451,7 @@ test_expect_success 'refs/replace/ to add more initial history' '
>         )
>  '
>
> -test_expect_success 'creation/deletion/updating of replace refs' '
> +test_expect_success FUNNYNAMES 'creation/deletion/updating of replace refs' '
>         setup_metasyntactic_repo &&
>         (
>                 git clone file://"$(pwd)"/metasyntactic replace_handling &&
> @@ -510,7 +510,7 @@ test_expect_success 'creation/deletion/updating of replace refs' '
>         )
>  '
>
> -test_expect_success '--debug' '
> +test_expect_success FUNNYNAMES '--debug' '
>         setup_metasyntactic_repo &&
>         (
>                 git clone file://"$(pwd)"/metasyntactic debug &&
> @@ -533,7 +533,7 @@ test_expect_success '--debug' '
>         )
>  '
>
> -test_expect_success '--dry-run' '
> +test_expect_success FUNNYNAMES '--dry-run' '
>         setup_metasyntactic_repo &&
>         (
>                 git clone file://"$(pwd)"/metasyntactic dry_run &&
> @@ -561,7 +561,7 @@ test_expect_success '--dry-run' '
>         )
>  '
>
> -test_expect_success '--dry-run --debug' '
> +test_expect_success FUNNYNAMES '--dry-run --debug' '
>         setup_metasyntactic_repo &&
>         (
>                 git clone file://"$(pwd)"/metasyntactic dry_run_debug &&
> @@ -589,7 +589,7 @@ test_expect_success '--dry-run --debug' '
>         )
>  '
>
> -test_expect_success '--dry-run --stdin' '
> +test_expect_success FUNNYNAMES '--dry-run --stdin' '
>         setup_metasyntactic_repo &&
>         (
>                 git clone file://"$(pwd)"/metasyntactic dry_run_stdin &&
> @@ -892,7 +892,8 @@ test_expect_success '--strip-blobs-with-ids' '
>                 grep fake_submodule ../filenames &&
>
>                 # Strip "a certain file" files
> -               git filter-repo --strip-blobs-with-ids <(echo deadbeefdeadbeefdeadbeefdeadbeefdeadbeef) &&
> +               echo deadbeefdeadbeefdeadbeefdeadbeefdeadbeef >../input &&
> +               git filter-repo --strip-blobs-with-ids ../input &&
>
>                 git log --format=%n --name-only | sort | uniq >../filenames &&
>                 test_line_count = 10 ../filenames &&
> @@ -917,7 +918,7 @@ test_expect_success '--strip-blobs-with-ids' '
>                 ! grep words/to ../filenames &&
>                 ! grep capricious ../filenames &&
>                 ! grep fickle ../filenames &&
> -               ! grep mercurial ../filenames
> +               ! grep mercurial ../filenames &&
>
>                 # Remove the temporary auxiliary files
>                 rm ../bad-ids &&
> -- snap --
>
> (There are two unrelated fixes in there, to be sure.)
>
> I wonder whether there would be a chance that you and I could combine
> efforts so that git-filter-repo is MEAOW (Most Enjoyable Also On Windows)?
> Maybe starting with the addition of a GitHub workflow that uses Git for
> Windows' SDK via something along the lines of Git's `windows-build` steps:
> https://github.com/git/git/blob/v2.29.0/.github/workflows/main.yml#L81-L95
> (although it would need the full `git-sdk-64` artifact of
> https://dev.azure.com/git-for-windows/git/_build?definitionId=29&_a=summary
> because it requires Python, which git-sdk-64-minimal excludes)?

Sounds great!  Thanks for kicking it off (over at
https://github.com/newren/git-filter-repo/pull/167, for those
following along).

Elijah
diff mbox series

Patch

diff --git a/git-filter-repo b/git-filter-repo
index ac039ec..7e2a534 100755
--- a/git-filter-repo
+++ b/git-filter-repo
@@ -1,4 +1,4 @@ 
-#!/usr/bin/env python3
+#!/usr/bin/env python

 """
 git-filter-repo filters git repositories, similar to git filter-branch, BFG
diff --git a/t/t9390-filter-repo.sh b/t/t9390-filter-repo.sh
index 14bdeaa..d7f9f1f 100755
--- a/t/t9390-filter-repo.sh
+++ b/t/t9390-filter-repo.sh
@@ -298,7 +298,7 @@  setup_metasyntactic_repo() {
 	)
 }

-test_expect_success '--tag-rename' '
+test_expect_success FUNNYNAMES '--tag-rename' '
 	setup_metasyntactic_repo &&
 	(
 		git clone file://"$(pwd)"/metasyntactic tag_rename &&
@@ -317,7 +317,7 @@  test_expect_success '--tag-rename' '
 	)
 '

-test_expect_success '--subdirectory-filter' '
+test_expect_success FUNNYNAMES '--subdirectory-filter' '
 	setup_metasyntactic_repo &&
 	(
 		git clone file://"$(pwd)"/metasyntactic subdir_filter &&
@@ -336,7 +336,7 @@  test_expect_success '--subdirectory-filter' '
 	)
 '

-test_expect_success '--subdirectory-filter with trailing slash' '
+test_expect_success FUNNYNAMES '--subdirectory-filter with trailing slash' '
 	setup_metasyntactic_repo &&
 	(
 		git clone file://"$(pwd)"/metasyntactic subdir_filter_2 &&
@@ -355,7 +355,7 @@  test_expect_success '--subdirectory-filter with trailing slash' '
 	)
 '

-test_expect_success '--to-subdirectory-filter' '
+test_expect_success FUNNYNAMES '--to-subdirectory-filter' '
 	setup_metasyntactic_repo &&
 	(
 		git clone file://"$(pwd)"/metasyntactic to_subdir_filter &&
@@ -375,7 +375,7 @@  test_expect_success '--to-subdirectory-filter' '
 	)
 '

-test_expect_success '--use-base-name' '
+test_expect_success FUNNYNAMES '--use-base-name' '
 	setup_metasyntactic_repo &&
 	(
 		git clone file://"$(pwd)"/metasyntactic use_base_name &&
@@ -394,7 +394,7 @@  test_expect_success '--use-base-name' '
 	)
 '

-test_expect_success 'refs/replace/ to skip a parent' '
+test_expect_success FUNNYNAMES 'refs/replace/ to skip a parent' '
 	setup_metasyntactic_repo &&
 	(
 		git clone file://"$(pwd)"/metasyntactic replace_skip_ref &&
@@ -416,7 +416,7 @@  test_expect_success 'refs/replace/ to skip a parent' '
 	)
 '

-test_expect_success 'refs/replace/ to add more initial history' '
+test_expect_success FUNNYNAMES 'refs/replace/ to add more initial history' '
 	setup_metasyntactic_repo &&
 	(
 		git clone file://"$(pwd)"/metasyntactic replace_add_refs &&
@@ -451,7 +451,7 @@  test_expect_success 'refs/replace/ to add more initial history' '
 	)
 '

-test_expect_success 'creation/deletion/updating of replace refs' '
+test_expect_success FUNNYNAMES 'creation/deletion/updating of replace refs' '
 	setup_metasyntactic_repo &&
 	(
 		git clone file://"$(pwd)"/metasyntactic replace_handling &&
@@ -510,7 +510,7 @@  test_expect_success 'creation/deletion/updating of replace refs' '
 	)
 '

-test_expect_success '--debug' '
+test_expect_success FUNNYNAMES '--debug' '
 	setup_metasyntactic_repo &&
 	(
 		git clone file://"$(pwd)"/metasyntactic debug &&
@@ -533,7 +533,7 @@  test_expect_success '--debug' '
 	)
 '

-test_expect_success '--dry-run' '
+test_expect_success FUNNYNAMES '--dry-run' '
 	setup_metasyntactic_repo &&
 	(
 		git clone file://"$(pwd)"/metasyntactic dry_run &&
@@ -561,7 +561,7 @@  test_expect_success '--dry-run' '
 	)
 '

-test_expect_success '--dry-run --debug' '
+test_expect_success FUNNYNAMES '--dry-run --debug' '
 	setup_metasyntactic_repo &&
 	(
 		git clone file://"$(pwd)"/metasyntactic dry_run_debug &&
@@ -589,7 +589,7 @@  test_expect_success '--dry-run --debug' '
 	)
 '

-test_expect_success '--dry-run --stdin' '
+test_expect_success FUNNYNAMES '--dry-run --stdin' '
 	setup_metasyntactic_repo &&
 	(
 		git clone file://"$(pwd)"/metasyntactic dry_run_stdin &&
@@ -892,7 +892,8 @@  test_expect_success '--strip-blobs-with-ids' '
 		grep fake_submodule ../filenames &&

 		# Strip "a certain file" files
-		git filter-repo --strip-blobs-with-ids <(echo deadbeefdeadbeefdeadbeefdeadbeefdeadbeef) &&
+		echo deadbeefdeadbeefdeadbeefdeadbeefdeadbeef >../input &&
+		git filter-repo --strip-blobs-with-ids ../input &&

 		git log --format=%n --name-only | sort | uniq >../filenames &&
 		test_line_count = 10 ../filenames &&
@@ -917,7 +918,7 @@  test_expect_success '--strip-blobs-with-ids' '
 		! grep words/to ../filenames &&
 		! grep capricious ../filenames &&
 		! grep fickle ../filenames &&
-		! grep mercurial ../filenames
+		! grep mercurial ../filenames &&

 		# Remove the temporary auxiliary files
 		rm ../bad-ids &&