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

BUGFIX: 627 fix include order#628

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

Closed
DanielSiepmann wants to merge2 commits intogitpython-developers:masterfromDanielSiepmann:hotfix/627-fix-include-order
Closed
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
6 changes: 5 additions & 1 deletiongit/config.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -410,6 +410,7 @@ def read(self):
# Read includes and append those that we didn't handle yet
# We expect all paths to be normalized and absolute (and will assure that is the case)
if self._has_includes():
include_paths = []
for _, include_path in self.items('include'):
if include_path.startswith('~'):
include_path = osp.expanduser(include_path)
Expand All@@ -424,8 +425,11 @@ def read(self):
if include_path in seen or not os.access(include_path, os.R_OK):
continue
seen.add(include_path)
files_to_read.append(include_path)
include_paths.append(include_path)
num_read_include_files += 1
include_paths.reverse()
Copy link
Member

Choose a reason for hiding this comment

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

I think this block should be rewritten like this:

files_to_read=include_paths+files_to_read

This makes clearer that included files should be read and merged first.

for include_path in include_paths:
files_to_read.insert(0, include_path)
# each include path in configuration file
# end handle includes
# END for each file object to read
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp