Skip to content

Commit

Permalink
Tweak message about GIT_PYTHON_REFRESH for 80-column terminals
Browse files Browse the repository at this point in the history
The fragment of the refresh failure message (which is often written
to a terminal) about the effect of setting GIT_PYTHON_REFRESH to
control refesh failure reporting had previously been formatted with
a maximum line length of 79 columns--in the message itself, not the
code for the message--so that it would fit in a traditional 80
column wide terminal. This remains one of the popular widths to set
for terminal windows in a GUI, so it seems worthwhile to preserve.

In 3a6e3ef (#1815), I had inadvertently made the line one character
too long for that; at 80 columns, it would cause the newline to be
written at the start of the next line, creating an unsightly extra
line break.

This is pretty minor, but what seems to me like an equally good
alternative wording avoids it, so this commit shortens the wording.
  • Loading branch information
EliahKagan committed Feb 26, 2024
1 parent c0cd8a8 commit afd943a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions git/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ def refresh(cls, path: Union[None, PathLike] = None) -> bool:
This initial message can be silenced or aggravated in the future by setting the
$%s environment variable. Use one of the following values:
- %s: for no message or exception
- %s: for a warning message (logged at level CRITICAL, displayed by default)
- %s: for a warning message (logging level CRITICAL, displayed by default)
- %s: for a raised exception
Example:
Expand Down Expand Up @@ -509,7 +509,7 @@ def refresh(cls, path: Union[None, PathLike] = None) -> bool:
Use only the following values:
- %s: for no message or exception
- %s: for a warning message (logged at level CRITICAL, displayed by default)
- %s: for a warning message (logging level CRITICAL, displayed by default)
- %s: for a raised exception
"""
)
Expand Down

0 comments on commit afd943a

Please sign in to comment.