#2 Fix FTBFS on rawhide and F40
Merged 2 months ago by asn. Opened 2 months ago by salimma.
rpms/ salimma/git-filter-repo fix-ftbfs  into  rawhide

@@ -0,0 +1,75 @@ 

+ --- a/t/t9390-filter-repo.sh

+ +++ b/t/t9390-filter-repo.sh

+ @@ -749,7 +749,7 @@ test_expect_success C_LOCALE_OUTPUT '--a

+  		  Number of file extensions: 2

+  

+  		  Total unpacked size (bytes): 206

+ -		  Total packed size (bytes): 387

+ +		  Total packed size (bytes): 389

+  

+  		EOF

+  		head -n 9 README >actual &&

+ @@ -758,7 +758,7 @@ test_expect_success C_LOCALE_OUTPUT '--a

+  		cat >expect <<-\EOF &&

+  		=== Files by sha and associated pathnames in reverse size ===

+  		Format: sha, unpacked size, packed size, filename(s) object stored as

+ -		  a89c82a2d4b713a125a4323d25adda062cc0013d         44         48 numbers/medium.num

+ +		  a89c82a2d4b713a125a4323d25adda062cc0013d         44         50 numbers/medium.num

+  		  c58ae2ffaf8352bd9860bf4bbb6ea78238dca846         35         41 fickle

+  		  ccff62141ec7bae42e01a3dcb7615b38aa9fa5b3         24         40 fickle

+  		  f00c965d8307308469e537302baa73048488f162         21         37 numbers/small.num

+ @@ -773,8 +773,8 @@ test_expect_success C_LOCALE_OUTPUT '--a

+  		cat >expect <<-EOF &&

+  		=== All directories by reverse size ===

+  		Format: unpacked size, packed size, date deleted, directory name

+ -		         206        387 <present>  <toplevel>

+ -		          65         85 2005-04-07 numbers

+ +		         206        389 <present>  <toplevel>

+ +		          65         87 2005-04-07 numbers

+  		          13         58 <present>  words

+  		          10         40 <present>  sequence

+  		EOF

+ @@ -783,7 +783,7 @@ test_expect_success C_LOCALE_OUTPUT '--a

+  		cat >expect <<-EOF &&

+  		=== Deleted directories by reverse size ===

+  		Format: unpacked size, packed size, date deleted, directory name

+ -		          65         85 2005-04-07 numbers

+ +		          65         87 2005-04-07 numbers

+  		EOF

+  		test_cmp expect directories-deleted-sizes.txt &&

+  

+ @@ -791,14 +791,14 @@ test_expect_success C_LOCALE_OUTPUT '--a

+  		=== All extensions by reverse size ===

+  		Format: unpacked size, packed size, date deleted, extension name

+  		         141        302 <present>  <no extension>

+ -		          65         85 2005-04-07 .num

+ +		          65         87 2005-04-07 .num

+  		EOF

+  		test_cmp expect extensions-all-sizes.txt &&

+  

+  		cat >expect <<-EOF &&

+  		=== Deleted extensions by reverse size ===

+  		Format: unpacked size, packed size, date deleted, extension name

+ -		          65         85 2005-04-07 .num

+ +		          65         87 2005-04-07 .num

+  		EOF

+  		test_cmp expect extensions-deleted-sizes.txt &&

+  

+ @@ -806,7 +806,7 @@ test_expect_success C_LOCALE_OUTPUT '--a

+  		=== All paths by reverse accumulated size ===

+  		Format: unpacked size, packed size, date deleted, path name

+  		          72        110 <present>  fickle

+ -		          44         48 2005-04-07 numbers/medium.num

+ +		          44         50 2005-04-07 numbers/medium.num

+  		           8         38 <present>  words/know

+  		          21         37 2005-04-07 numbers/small.num

+  		          20         36 <present>  whatever

+ @@ -821,7 +821,7 @@ test_expect_success C_LOCALE_OUTPUT '--a

+  		cat >expect <<-EOF &&

+  		=== Deleted paths by reverse accumulated size ===

+  		Format: unpacked size, packed size, date deleted, path name(s)

+ -		          44         48 2005-04-07 numbers/medium.num

+ +		          44         50 2005-04-07 numbers/medium.num

+  		          21         37 2005-04-07 numbers/small.num

+  		EOF

+  		test_cmp expect path-deleted-sizes.txt

@@ -0,0 +1,32 @@ 

+ From 1db1650e6e14443a5a8163213434aec5e190f193 Mon Sep 17 00:00:00 2001

+ From: Vladimir Petko <vladimir.petko@canonical.com>

+ Date: Fri, 8 Dec 2023 15:05:34 +1300

+ Subject: [PATCH] support git 2.43

+ 

+ Git 2.43 changes --mark-tags to --[no-]mark-tags and --reencode to --[no-]reencode. Use both options for the detection check.

+ 

+ Signed-off-by: Vladimir Petko <vladimir.petko@canonical.com>

+ ---

+  git-filter-repo | 4 ++--

+  1 file changed, 2 insertions(+), 2 deletions(-)

+ 

+ diff --git a/git-filter-repo b/git-filter-repo

+ index ae71fad1..ed61b405 100755

+ --- a/git-filter-repo

+ +++ b/git-filter-repo

+ @@ -2067,13 +2067,13 @@ EXAMPLES

+      if b'--anonymize-map' not in output: # pragma: no cover

+        global date_format_permissive

+        date_format_permissive = False

+ -    if b'--mark-tags' not in output: # pragma: no cover

+ +    if not any(x in output for x in [b'--mark-tags',b'--[no-]mark-tags']): # pragma: no cover

+        global write_marks

+        write_marks = False

+        if args.state_branch:

+          # We need a version of git-fast-export with --mark-tags

+          raise SystemExit(_("Error: need git >= 2.24.0"))

+ -    if b'--reencode' not in output: # pragma: no cover

+ +    if not any(x in output for x in [b'--reencode',  b'--[no-]reencode']): # pragma: no cover

+        if args.preserve_commit_encoding:

+          # We need a version of git-fast-export with --reencode

+          raise SystemExit(_("Error: need git >= 2.23.0"))

file modified
+9 -1
@@ -2,13 +2,16 @@ 

  

  Name:           git-filter-repo

  Version:        2.38.0

- Release:        5%{?dist}

+ Release:        6%{?dist}

  Summary:        Quickly rewrite git repository history (git-filter-branch replacement)

  License:        GPL-2.0-only OR MIT

  Group:          Development/Tools/Version Control

  Url:            https://github.com/newren/git-filter-repo

  #

  Source0:        https://github.com/newren/git-filter-repo/releases/download/v%{version}/%{name}-%{version}.tar.xz

+ Patch0:         https://github.com/newren/git-filter-repo/pull/526.patch#/%{name}-support-git-2_43.diff

+ # Some expected packed sizes in this test are off by two

+ Patch1:         %{name}-fix-t9390-t41.diff

  #

  BuildArch:      noarch

  #
@@ -76,6 +79,11 @@ 

  %{_mandir}/man1/git-filter-repo.1*

  

  %changelog

+ * Wed Mar 13 2024 Michel Lind <salimma@fedoraproject.org> - 2.38.0-6

+ - Apply PR#526 to support Git 2.43.0

+ - Fix one test where some expected packed sizes are off by two bytes

+ - Resolves: rhbz#2261155

+ 

  * Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.38.0-5

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

  

  • Apply PR#526 to support Git 2.43.0
  • Fix one test where some expected packed sizes are off by two bytes
  • Resolves: rhbz#2261155

Signed-off-by: Michel Lind salimma@fedoraproject.org

rebased onto 549907a

2 months ago

Look good to me. Thank you very much!

Pull-Request has been merged by asn

2 months ago