Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

git-add doesn't seem to work on submodules #335

Closed
Assignees
Byron
@kgadek

Description

@kgadek

It seems thatindex.add doesn't work with submodules. Found exactly same issue/question onstackoverflow.

Reproduction

First, some shell:

git init master_repocd master_repoecho"First"> progress_simulatorgit add progress_simulatorgit commit -m'First commit'git submodule add -b master git@github.com:gitpython-developers/GitPython.git subrepogit commit -m'Second commit: subrepo'

Now, the Python:

importgitmaster_repo=git.Repo('.')[subrepo_sm]=master_repo.submodulessubrepo=git.Repo(subrepo_sm.path)withopen('subrepo/interference.txt','w'):passsubrepo.index.add(['interference.txt'])subrepo.index.commit('My intrusion into this project')master_repo.index.add([subrepo_sm])

Expected vs result

I expected to seemaster_repo index acknowledge that thesubrepo submodule pointer changed. However, nothing happens.

System info

$ python -VPython 3.4.3$ git --versiongit version 2.4.2

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp