Skip to content

Commit 1a0ab5b

Browse files
authored
Use endswith() for more clarity
1 parent c2283f6 commit 1a0ab5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: git/config.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ def _read(self, fp: Union[BufferedReader, IO[bytes]], fpname: str) -> None:
452452
e = None # None, or an exception.
453453

454454
def string_decode(v: str) -> str:
455-
if v and v[-1] == "\\":
455+
if v and v.endswith("\\"):
456456
v = v[:-1]
457457
# END cut trailing escapes to prevent decode error
458458

0 commit comments

Comments
 (0)