Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: gitpython-developers/GitPython
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3.1.38
Choose a base ref
...
head repository: gitpython-developers/GitPython
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3.1.40
Choose a head ref
  • 6 commits
  • 6 files changed
  • 2 contributors

Commits on Oct 18, 2023

  1. Add missing info in Submodule.remove docstring

    This rewords and adds some missing information to the docstring of
    Submodule.remove, for the "method" parameter, discussed in #1712.
    It uses the second suggestion presented in that issue, formatted
    in the style of the surrounding docstring (an 88-column wrap).
    
    It also does some other rewording in that docstring, for clarity,
    at the end of that same section (on the "method" parameter), and a
    small punctuation fix in the section about the "force" parameter.
    EliahKagan committed Oct 18, 2023
    Copy the full SHA
    427c177 View commit details
  2. Don't pre-clone submodules on CI, at least for now

    This has actions/checkout no longer automatically clone submodules
    in the CI test workflows. This change is for the purpose of
    reproducing #1713, to allow the forthcoming fix for it to be
    tested.
    
    However, continuing to rely on init-tests-after-clone.sh to get the
    submodules would serve as a kind of regression testing for #1713.
    So it is unclear at this time if and when this change should be
    undone.
    EliahKagan committed Oct 18, 2023
    Copy the full SHA
    bb48c87 View commit details
  3. Have init script clone submodules unconditionally

    Since 7110bf8 (in #1693), "git submodule update --init --recursive"
    was not run on CI, on the mistaken grounds that the CI test
    workflows would already have taken care of cloning all submodules
    (ever since 4eef3ec when the "submodules: recursive" option was
    added to the actions/checkout step).
    
    This changes the init-tests-after-clone.sh script to again run that
    command unconditionally, including on CI. The assumption that it
    wasn't needed on CI was based on the specific content of
    GitPython's own GitHub Actions workflows. But this disregarded that
    the test suite is run on CI for *other* projects: specifically, for
    downstream projects that package GitPython (#1713).
    
    This also brings back the comment from fc96980 that says more about
    how the tests rely on submodules being present (specifically, that
    they need a submodule with a submodule). However, that is not
    specifically related to the bug being fixed.
    EliahKagan committed Oct 18, 2023
    Copy the full SHA
    8ea3133 View commit details
  4. Merge pull request #1714 from EliahKagan/docstring-submodule-remove

    Add missing info in Submodule.remove docstring
    Byron authored Oct 18, 2023
    Copy the full SHA
    a5b2fa5 View commit details
  5. Merge pull request #1715 from EliahKagan/ci-submodules

    Have init script clone submodules unconditionally
    Byron authored Oct 18, 2023
    Copy the full SHA
    5ba2b84 View commit details
  6. prepare next release

    Byron committed Oct 18, 2023
    Copy the full SHA
    44102f3 View commit details
Showing with 16 additions and 15 deletions.
  1. +0 −1 .github/workflows/cygwin-test.yml
  2. +0 −1 .github/workflows/pythonpackage.yml
  3. +1 −1 VERSION
  4. +6 −0 doc/source/changes.rst
  5. +7 −8 git/objects/submodule/base.py
  6. +2 −4 init-tests-after-clone.sh
1 change: 0 additions & 1 deletion .github/workflows/cygwin-test.yml
Original file line number Diff line number Diff line change
@@ -26,7 +26,6 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive

- name: Install Cygwin
uses: cygwin/cygwin-install-action@v4
1 change: 0 additions & 1 deletion .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
@@ -27,7 +27,6 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.38
3.1.40
6 changes: 6 additions & 0 deletions doc/source/changes.rst
Original file line number Diff line number Diff line change
@@ -2,6 +2,12 @@
Changelog
=========

3.1.40
======

See the following for all changes.
https://github.com/gitpython-developers/GitPython/releases/tag/3.1.40

3.1.38
======

15 changes: 7 additions & 8 deletions git/objects/submodule/base.py
Original file line number Diff line number Diff line change
@@ -948,17 +948,16 @@ def remove(
"""Remove this submodule from the repository. This will remove our entry
from the .gitmodules file and the entry in the .git / config file.
:param module: If True, the module checkout we point to will be deleted
as well. If the module is currently on a commit which is not part
of any branch in the remote, if the currently checked out branch
working tree, or untracked files,
is ahead of its tracking branch, if you have modifications in the
:param module: If True, the checked out module we point to will be deleted as
well.If that module is currently on a commit outside any branch in the
remote, or if it is ahead of its tracking branch, or if there are modified
or untracked files in its working tree, then the removal will fail.
In case the removal of the repository fails for these reasons, the
submodule status will not have been altered.
If this submodule has child - modules on its own, these will be deleted
prior to touching the own module.
If this submodule has child modules of its own, these will be deleted prior
to touching the direct submodule.
:param force: Enforces the deletion of the module even though it contains
modifications. This basically enforces a brute - force file system based
modifications. This basically enforces a brute-force file system based
deletion.
:param configuration: if True, the submodule is deleted from the configuration,
otherwise it isn't. Although this should be enabled most of the times,
6 changes: 2 additions & 4 deletions init-tests-after-clone.sh
Original file line number Diff line number Diff line change
@@ -47,10 +47,8 @@ git reset --hard HEAD~1
# Point the master branch where we started, so we test the correct code.
git reset --hard __testing_point__

# The tests need submodules. (On CI, they would already have been checked out.)
if ! ci; then
git submodule update --init --recursive
fi
# The tests need submodules, including a submodule with a submodule.
git submodule update --init --recursive

# The tests need some version tags. Try to get them even in forks. This fetches
# other objects too. So, locally, we always do it, for a consistent experience.