Skip to content

RootModule.update(force_reset=True) not works as expected #337

Description

@Un1oR
cd /tmp
mkdir repo submodule

pushd submodule
git init
touch README.md
git add -A .
git commit -m 'Initial commit'
popd

pushd repo
git init
git submodule add --force /tmp/submodule/
git commit -m 'Initial commit'

echo FOO > submodule/README.md
git status

--> modified: submodule (modified content)

python
>>> import git
>>> repo = git.Repo()
>>> repo.submodule_update(force_reset=True)

git status

--> modified: submodule (modified content)

git submodule foreach git reset --hard
git status

--> nothing to commit, working directory clean

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions