Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: #1281 pre-commit fails with log.showsignature=True #1283

Closed
wants to merge 2 commits into from
Closed
Changes from all 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
12 changes: 8 additions & 4 deletions src/jupytext/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -837,9 +837,11 @@ def lazy_write(path, fmt=None, action=None, update_timestamp_only=False):
else:
message = "[jupytext] Writing {path}{format}{action}".format(
path=shlex.quote(path),
format=" in format " + short_form_one_format(fmt)
if fmt and "format_name" in fmt
else "",
format=(
" in format " + short_form_one_format(fmt)
if fmt and "format_name" in fmt
else ""
),
action=action,
)
if diff is not None:
Expand Down Expand Up @@ -1057,7 +1059,9 @@ def git_timestamp(path):

# Return the commit timestamp
try:
git_ts_str = system("git", "log", "-1", "--pretty=%ct", path).strip()
git_ts_str = system(
"git", "log", "-1", "--pretty=%ct", "--no-show-signature", path
).strip()
except SystemExit as err:
if err.code == 128:
# git not initialized
Expand Down
Loading