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

Update instructions and test helpers for git-daemon#1684

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
Byron merged 2 commits intogitpython-developers:mainfromEliahKagan:daemon
Oct 2, 2023
Merged
Show file tree
Hide file tree
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
3 changes: 1 addition & 2 deletionsREADME.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -119,8 +119,7 @@ executed `git fetch --tags` followed by the `./init-tests-after-clone.sh`
script in the repository root. Otherwise you will encounter test failures.

On _Windows_, make sure you have `git-daemon` in your PATH. For MINGW-git, the `git-daemon.exe`
exists in `Git\mingw64\libexec\git-core\`; CYGWIN has no daemon, but should get along fine
with MINGW's.
exists in `Git\mingw64\libexec\git-core\`.

#### Install test dependencies

Expand Down
17 changes: 7 additions & 10 deletionstest/lib/helper.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -177,12 +177,10 @@ def git_daemon_launched(base_path, ip, port):
gd = None
try:
if is_win:
## On MINGW-git, daemon exists in .\Git\mingw64\libexec\git-core\,
# but if invoked as 'git daemon', it detaches from parent `git` cmd,
# and then CANNOT DIE!
# So, invoke it as a single command.
## Cygwin-git has no daemon. But it can use MINGW's.
#
# On MINGW-git, daemon exists in Git\mingw64\libexec\git-core\,
# but if invoked as 'git daemon', it detaches from parent `git` cmd,
# and then CANNOT DIE!
# So, invoke it as a single command.
daemon_cmd = [
"git-daemon",
"--enable=receive-pack",
Expand DownExpand Up@@ -217,12 +215,11 @@ def git_daemon_launched(base_path, ip, port):
)
if is_win:
msg += textwrap.dedent(
r"""
R"""
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Using a capitalR here instead ofr causes some editors to display the string as truly raw, rather than as a regular expression.black permits both case variants, even though they mean the same thing to all Python implementations, to allow for this expressiveness. I found this made the string much easier to read in VS Code. However, you may nonetheless prefer this not be done, or that it be deferred until it can be more consistently applied across the codebase. I certainly have no objection to putting this back tor.

Copy link
Member

Choose a reason for hiding this comment

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

That's a super-interesting feature and I wasn't aware! I think there is great value in having (at least some) editors display the string in a more readable fashion, so yes, please keep making these improvements.

EliahKagan reacted with thumbs up emoji

On Windows,
the `git-daemon.exe` must be in PATH.
For MINGW, look into .\Git\mingw64\libexec\git-core\), but problems with paths might appear.
CYGWIN has no daemon, but if one exists, it gets along fine (but has also paths problems)."""
For MINGW, look into \Git\mingw64\libexec\git-core\, but problems with paths might appear."""
)
log.warning(msg, ex, ip, port, base_path, base_path, exc_info=1)

Expand DownExpand Up@@ -305,7 +302,7 @@ def remote_repo_creator(self):
cw.set("url", remote_repo_url)

with git_daemon_launched(
Git.polish_url(base_daemon_path, is_cygwin=False), # No daemon in Cygwin.
Git.polish_url(base_daemon_path),
"127.0.0.1",
GIT_DAEMON_PORT,
):
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp