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: warn user about old version of git when using mergetool #3637

Merged
merged 3 commits into from
Oct 17, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions renku/infrastructure/git_merger.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import os
import shutil
import traceback
from json import JSONDecodeError
from pathlib import Path
from tempfile import mkdtemp
Expand Down Expand Up @@ -117,6 +118,12 @@ def _setup_worktrees(self, repository):
)
)
except Exception:
exc_str = traceback.format_exc(limit=None, chain=True)
if "No such file or directory" in exc_str and "Unable to create" in exc_str:
communication.error(
"Error when trying to sparse checkout worktree. Dies is likely due to using an old version of "
Panaetius marked this conversation as resolved.
Show resolved Hide resolved
"git. Please try with a newer version."
)
# NOTE: cleanup worktree
try:
repository.remove_worktree(worktree_path)
Expand Down