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

Commitca3fdbe

Browse files
committed
submodule.update: now forcing the checkout - see in-code comments
1 parent8f24f95 commitca3fdbe

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

‎.gitmodules‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
[submodule "gitdb"]
2-
path=lib/git/ext/gitdb
3-
url=git://gitorious.org/git-python/gitdb.git
1+
[submodule "gitdb"]
2+
path=lib/git/ext/gitdb
3+
url=git://gitorious.org/git-python/gitdb.git

‎lib/git/objects/submodule/base.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,11 @@ def update(self, recursive=False, init=True, to_latest_revision=False):
387387
# update the working tree
388388
ifmrepo.head.commit.binsha!=binsha:
389389
ifis_detached:
390-
mrepo.git.checkout(hexsha)
390+
# NOTE: for now we force, the user is no supposed to change detached
391+
# submodules anyway. Maybe at some point this becomes an option, to
392+
# properly handle user modifications - see below for future options
393+
# regarding rebase and merge.
394+
mrepo.git.checkout(hexsha,force=True)
391395
else:
392396
# TODO: allow to specify a rebase, merge, or reset
393397
# TODO: Warn if the hexsha forces the tracking branch off the remote

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2026 Movatter.jp