#728 Restrict Git index version to what GitPython supports
Opened 2 months ago by oturpe. Modified 22 days ago
oturpe/rpkg force-git-index-v2  into  master

file modified
+3
@@ -1601,6 +1601,9 @@ 

  

          # Create the command

          cmd = ['git', 'clone']

+         # Restrict index version to what GitPython supports

+         # https://github.com/gitpython-developers/GitPython/issues/1960

+         cmd.extend(['-c', 'index.version=2'])

          if self.quiet:

              cmd.append('-q')

          if depth:

file modified
+6 -4
@@ -629,8 +629,9 @@ 

              cli = self.new_cli()

              cli.clone()

  

-         expected_cmd = ['git', 'clone', 'ssh://dude@localhost/repository_name',

-                         '--origin', 'origin', '--progress']

+         expected_cmd = ['git', 'clone', '-c', 'index.version=2',

+                         'ssh://dude@localhost/repository_name', '--origin',

+                         'origin', '--progress']

          _run_command.assert_called_once_with(expected_cmd,

                                               cwd=self.cloned_repo_path)

          output = sys.stderr.getvalue().strip()
@@ -675,8 +676,9 @@ 

              cli = self.new_cli()

              cli.clone()

  

-         expected_cmd = ['git', 'clone', 'ssh://dude@localhost/repository_name',

-                         '--origin', 'origin', '--progress']

+         expected_cmd = ['git', 'clone', '-c', 'index.version=2',

+                         'ssh://dude@localhost/repository_name', '--origin',

+                         'origin', '--progress']

          _run_command.assert_called_once_with(expected_cmd,

                                               cwd=self.cloned_repo_path)

          output = sys.stderr.getvalue().strip()

The Git index version used by a repository is set when the repository is cloned. If the user has a non-default Git config likefeature.manyFiles=true, index versions above the default of 2 may be used. On the other hand, GitPython, and consequently rpkg, do not support anything above 2. Create repositories that can be manipulated by rpkg by forcing index version 2 when cloning.

Upstream issue:
https://github.com/gitpython-developers/GitPython/issues/1960

Original report at Fedora Package Maintainer Docs:
https://pagure.io/fedora-docs/package-maintainer-docs/pull-request/173

rebased onto f3cbcdd

2 months ago

The remaining Jenkins failure on Python 3.6 looks unrelated to this PR. All Jenkins runs since 2024-12-16 see this error. Since the error seems to be about reading pyproject.tomlof pycurl and pycurl 7.45.4 release date is between the last successful and first failing run, I suspect something changed there which broke rpkg Python 3.6 CI.

rebased onto 1f26177

23 days ago

rebased onto 7aa8057

22 days ago
Metadata