Skip to content

Commit 44cba30

Browse files
committed
speed up changeset.split() call
1 parent c8350ae commit 44cba30

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

tools/ignore_pot_creation_date.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,8 @@ def revert_po_file(changeset, po_file: pathlib.Path) -> None:
6161
"""
6262
Reverts a PO file to its original state in the given changeset.
6363
"""
64-
ref = changeset.split("...")[
65-
0
66-
] # Use the first part of the changeset as the reference
64+
# Use the first part of the changeset as the reference
65+
ref = changeset.split("...", 1)[0]
6766
logger = logging.getLogger(__name__)
6867
logger.info(f"{po_file} has no meaningful changes, reverting to {ref}")
6968
cmd = ["git", "show", f"{ref}:{po_file}"]

0 commit comments

Comments
 (0)