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

Commit0451fdd

Browse files
committed
update
1 parent94e82e1 commit0451fdd

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

‎git/objects/submodule/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,11 +416,11 @@ def _write_git_file_and_module_config(cls, working_tree_dir: PathLike, module_ab
416416
Absolute path to the bare repository.
417417
"""
418418
git_file=osp.join(working_tree_dir,".git")
419-
relative_fpath=osp.relpath(module_abspath,start=working_tree_dir)
419+
relative_path=osp.relpath(module_abspath,start=working_tree_dir)
420420
ifsys.platform=="win32"andosp.isfile(git_file):
421421
os.remove(git_file)
422422
withopen(git_file,"wb")asfp:
423-
fp.write(("gitdir: %s"%relative_fpath).encode(defenc))
423+
fp.write(("gitdir: %s"%relative_path).encode(defenc))
424424

425425
withGitConfigParser(osp.join(module_abspath,"config"),read_only=False,merge_includes=False)aswriter:
426426
writer.set_value(

‎git/objects/util.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -568,11 +568,11 @@ def addToStack(
568568
yieldrval
569569

570570
# Only continue to next level if this is appropriate!
571-
nb=d+1
572-
ifdepth>-1andnb>depth:
571+
next_depth=d+1
572+
ifdepth>-1andnext_depth>depth:
573573
continue
574574

575-
addToStack(stack,item,branch_first,nb)
575+
addToStack(stack,item,branch_first,next_depth)
576576
# END for each item on work stack
577577

578578

‎git/refs/symbolic.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def _get_ref_info(cls, repo: "Repo", ref_path: Union[PathLike, None]) -> Union[T
272272
:return:
273273
*(str(sha), str(target_ref_path))*, where:
274274
275-
* *sha* is of the file atrelative_fpath points to if available, or ``None``.
275+
* *sha* is of the file atrelative_path points to if available, or ``None``.
276276
* *target_ref_path* is the reference we point to, or ``None``.
277277
"""
278278
returncls._get_ref_info_helper(repo,ref_path)
@@ -813,7 +813,7 @@ def _iter_items(
813813
)->Iterator[T_References]:
814814
ifcommon_pathisNone:
815815
common_path=cls._common_path_default
816-
relative_fpaths=set()
816+
relative_paths=set()
817817

818818
# Walk loose refs.
819819
# Currently we do not follow links.
@@ -828,19 +828,19 @@ def _iter_items(
828828
iff=="packed-refs":
829829
continue
830830
abs_path=to_native_path_linux(join_path(root,f))
831-
relative_fpaths.add(abs_path.replace(to_native_path_linux(repo.common_dir)+"/",""))
831+
relative_paths.add(abs_path.replace(to_native_path_linux(repo.common_dir)+"/",""))
832832
# END for each file in root directory
833833
# END for each directory to walk
834834

835835
# Read packed refs.
836836
for_sha,relative_fpathincls._iter_packed_refs(repo):
837837
ifrelative_fpath.startswith(str(common_path)):
838-
relative_fpaths.add(relative_fpath)
838+
relative_paths.add(relative_fpath)
839839
# END relative path matches common path
840840
# END packed refs reading
841841

842842
# Yield paths in sorted order.
843-
forpathinsorted(relative_fpaths):
843+
forpathinsorted(relative_paths):
844844
try:
845845
yieldcls.from_path(repo,path)
846846
exceptValueError:

‎test/lib/helper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,15 +386,15 @@ def tearDownClass(cls):
386386
cls.rorepo.git.clear_cache()
387387
cls.rorepo.git=None
388388

389-
def_make_file(self,relative_fpath,data,repo=None):
389+
def_make_file(self,relative_path,data,repo=None):
390390
"""
391391
Create a file at the given path relative to our repository, filled with the
392392
given data.
393393
394394
:return: An absolute path to the created file.
395395
"""
396396
repo=repoorself.rorepo
397-
abs_path=osp.join(repo.working_tree_dir,relative_fpath)
397+
abs_path=osp.join(repo.working_tree_dir,relative_path)
398398
withopen(abs_path,"w")asfp:
399399
fp.write(data)
400400
returnabs_path

‎test/test_refs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class TestRefs(TestBase):
3232
deftest_from_path(self):
3333
# Should be able to create any reference directly.
3434
forref_typein (Reference,Head,TagReference,RemoteReference):
35-
fornamein ("relative_fpath","path/rela_name"):
35+
fornamein ("relative_path","path/rela_name"):
3636
full_path=ref_type.to_full_path(name)
3737
instance=ref_type.from_path(self.rorepo,full_path)
3838
assertisinstance(instance,ref_type)
@@ -454,7 +454,7 @@ def test_head_reset(self, rw_repo):
454454

455455
# Rename it.
456456
orig_obj=ref.object
457-
fornamein ("refs/absname","relative_fpath","feature/rela_name"):
457+
fornamein ("refs/absname","relative_path","feature/rela_name"):
458458
ref_new_name=ref.rename(name)
459459
assertisinstance(ref_new_name,Reference)
460460
assertnameinref_new_name.path

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp