◐ Shell
reader mode source ↗
Skip to content
Merged
Show file tree
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
7 changes: 3 additions & 4 deletions .github/workflows/cygwin-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
SHELLOPTS: igncr
TMP: "/tmp"
TEMP: "/tmp"
steps:
- name: Force LF line endings
run: git config --global core.autocrlf input
Expand All @@ -24,9 +24,8 @@ jobs:
packages: python39 python39-pip python39-virtualenv git
- name: Tell git to trust this repo
shell: bash.exe -eo pipefail -o igncr "{0}"
run: |
/usr/bin/git config --global --add safe.directory $(pwd)
/usr/bin/git config --global protocol.file.allow always
- name: Install dependencies and prepare tests
shell: bash.exe -eo pipefail -o igncr "{0}"
run: |
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@ jobs:
set -x
mypy -p git

- name: Tell git to trust this repo
run: |
/usr/bin/git config --global --add safe.directory $(pwd)
/usr/bin/git config --global protocol.file.allow always

- name: Test with pytest
run: |
set -x
Expand Down
22 changes: 21 additions & 1 deletion test/test_submodule.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# -*- coding: utf-8 -*-
# This module is part of GitPython and is released under
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
import os
import shutil
import tempfile
from pathlib import Path
import sys
from unittest import skipIf

import pytest

Expand All @@ -31,6 +32,23 @@
import os.path as osp


class TestRootProgress(RootUpdateProgress):
"""Just prints messages, for now without checking the correctness of the states"""

Expand Down Expand Up @@ -709,6 +727,7 @@ def test_add_empty_repo(self, rwdir):
# end for each checkout mode

@with_rw_directory
def test_list_only_valid_submodules(self, rwdir):
repo_path = osp.join(rwdir, "parent")
repo = git.Repo.init(repo_path)
Expand Down Expand Up @@ -737,6 +756,7 @@ def test_list_only_valid_submodules(self, rwdir):
""",
)
@with_rw_directory
def test_git_submodules_and_add_sm_with_new_commit(self, rwdir):
parent = git.Repo.init(osp.join(rwdir, "parent"))
parent.git.submodule("add", self._small_repo_url(), "module")
Expand Down
Toggle all file notes Toggle all file annotations