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

BF: use get, not casting get_value while dealing with submodule path/url etc#667

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletionsgit/objects/submodule/base.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -123,12 +123,12 @@ def _set_cache_(self, attr):
reader = self.config_reader()
# default submodule values
try:
self.path = reader.get_value('path')
self.path = reader.get('path')
except cp.NoSectionError:
raise ValueError("This submodule instance does not exist anymore in '%s' file"
% osp.join(self.repo.working_tree_dir, '.gitmodules'))
# end
self._url = reader.get_value('url')
self._url = reader.get('url')
# git-python extension values - optional
self._branch_path = reader.get_value(self.k_head_option, git.Head.to_full_path(self.k_head_default))
elif attr == '_name':
Expand DownExpand Up@@ -1168,11 +1168,11 @@ def iter_items(cls, repo, parent_commit='HEAD'):

for sms in parser.sections():
n = sm_name(sms)
p = parser.get_value(sms, 'path')
u = parser.get_value(sms, 'url')
p = parser.get(sms, 'path')
u = parser.get(sms, 'url')
b = cls.k_head_default
if parser.has_option(sms, cls.k_head_option):
b = str(parser.get_value(sms, cls.k_head_option))
b = str(parser.get(sms, cls.k_head_option))
Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

could even strip away us of str here... note thatget is still advisable instead ofget_value since it could cast+str1.0 to1 and thenfalse toFalse.

# END handle optional information

# get the binsha
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp