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

Commit6cef9c0

Browse files
authored
Merge pull request#1725 from EliahKagan/strings
Revise comments, docstrings, some messages, and a bit of code
2 parents198548f +b970d42 commit6cef9c0

File tree

67 files changed

+3521
-3063
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+3521
-3063
lines changed

‎doc/source/conf.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# -*- coding: utf-8 -*-
2-
#
3-
# GitPython documentation build configuration file, created by
1+
# GitPython documentation build configuration file, originally created by
42
# sphinx-quickstart on Sat Jan 24 11:51:01 2009.
53
#
64
# This file is execfile()d with the current directory set to its containing dir.
@@ -170,7 +168,7 @@
170168
# Grouping the document tree into LaTeX files. List of tuples
171169
# (source start file, target name, title, author, document class [howto/manual]).
172170
latex_documents= [
173-
("index","GitPython.tex",r"GitPython Documentation",r"Michael Trier","manual"),
171+
("index","GitPython.tex","GitPython Documentation","Michael Trier","manual"),
174172
]
175173

176174
# The name of an image file (relative to this directory) to place at the top of

‎doc/source/tutorial.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ If you obtained your submodule object by traversing a tree object which is not r
413413
you have to inform the submodule about its actual commit to retrieve the data from
414414
by using the ``set_parent_commit(...)`` method.
415415

416-
The special:class:`RootModule <git.objects.submodule.root.RootModule>` type allows you to treat your master repository as root of a hierarchy of submodules, which allows very convenient submodule handling. Its ``update(...)`` method is reimplemented to provide an advanced way of updating submodules as they change their values over time. The update method will track changes and make sure your working tree and submodule checkouts stay consistent, which is very useful in case submodules get deleted or added to name just two of the handled cases.
416+
The special:class:`RootModule <git.objects.submodule.root.RootModule>` type allows you to treat yoursuperproject (master repository) as root of a hierarchy of submodules, which allows very convenient submodule handling. Its ``update(...)`` method is reimplemented to provide an advanced way of updating submodules as they change their values over time. The update method will track changes and make sure your working tree and submodule checkouts stay consistent, which is very useful in case submodules get deleted or added to name just two of the handled cases.
417417

418418
Additionally, GitPython adds functionality to track a specific branch, instead of just a commit. Supported by customized update methods, you are able to automatically update submodules to the latest revision available in the remote repository, as well as to keep track of changes and movements of these submodules. To use it, set the name of the branch you want to track to the ``submodule.$name.branch`` option of the *.gitmodules* file, and use GitPython update methods on the resulting repository with the ``to_latest_revision`` parameter turned on. In the latter case, the sha of your submodule will be ignored, instead a local tracking branch will be updated to the respective remote branch automatically, provided there are no local changes. The resulting behaviour is much like the one of svn::externals, which can be useful in times.
419419

@@ -545,4 +545,3 @@ And even more ...
545545
There is more functionality in there, like the ability to archive repositories, get stats and logs, blame, and probably a few other things that were not mentioned here.
546546

547547
Check the unit tests for an in-depth introduction on how each function is supposed to be used.
548-

‎git/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
#
44
# This module is part of GitPython and is released under
55
# the BSD License: https://opensource.org/license/bsd-3-clause/
6+
67
# flake8: noqa
78
# @PydevCodeAnalysisIgnore
9+
810
fromgit.excimport*# @NoMove @IgnorePep8
911
fromtypingimportList,Optional,Sequence,Tuple,Union,TYPE_CHECKING
1012
fromgit.typesimportPathLike

‎git/cmd.py

Lines changed: 192 additions & 181 deletions
Large diffs are not rendered by default.

‎git/compat.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
# -*- coding: utf-8 -*-
2-
# config.py
1+
# compat.py
32
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
43
#
54
# This module is part of GitPython and is released under
65
# the BSD License: https://opensource.org/license/bsd-3-clause/
7-
"""utilities to help provide compatibility with python 3"""
6+
7+
"""Utilities to help provide compatibility with Python 3."""
8+
89
# flake8: noqa
910

1011
importlocale
@@ -50,7 +51,7 @@ def safe_decode(s: AnyStr) -> str:
5051

5152

5253
defsafe_decode(s:Union[AnyStr,None])->Optional[str]:
53-
"""Safelydecodes a binary string tounicode"""
54+
"""Safelydecode a binary string toUnicode."""
5455
ifisinstance(s,str):
5556
returns
5657
elifisinstance(s,bytes):
@@ -72,7 +73,7 @@ def safe_encode(s: AnyStr) -> bytes:
7273

7374

7475
defsafe_encode(s:Optional[AnyStr])->Optional[bytes]:
75-
"""Safelyencodes a binary string tounicode"""
76+
"""Safelyencode a binary string toUnicode."""
7677
ifisinstance(s,str):
7778
returns.encode(defenc)
7879
elifisinstance(s,bytes):
@@ -94,7 +95,7 @@ def win_encode(s: AnyStr) -> bytes:
9495

9596

9697
defwin_encode(s:Optional[AnyStr])->Optional[bytes]:
97-
"""Encodeunicodes for process arguments on Windows."""
98+
"""EncodeUnicode strings for process arguments on Windows."""
9899
ifisinstance(s,str):
99100
returns.encode(locale.getpreferredencoding(False))
100101
elifisinstance(s,bytes):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp