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

Commit346424d

Browse files
committed
Assure to not iterate packed-refs file, ever.
Related togitpython-developers#252
1 parent0f5320e commit346424d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎git/refs/symbolic.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ def _get_ref_info(cls, repo, ref_path):
140140
# Don't only split on spaces, but on whitespace, which allows to parse lines like
141141
# 60b64ef992065e2600bfef6187a97f92398a9144 branch 'master' of git-server:/path/to/repo
142142
tokens=value.split()
143+
assert(len(tokens)!=0)
143144
except (OSError,IOError):
144145
# Probably we are just packed, find our entry in the packed refs file
145146
# NOTE: We are not a symbolic ref if we are in a packed file, as these
@@ -582,6 +583,8 @@ def _iter_items(cls, repo, common_path=None):
582583
# END prune non-refs folders
583584

584585
forfinfiles:
586+
iff=='packed-refs':
587+
continue
585588
abs_path=to_native_path_linux(join_path(root,f))
586589
rela_paths.add(abs_path.replace(to_native_path_linux(repo.git_dir)+'/',""))
587590
# END for each file in root directory

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp