Skip to content

Commit

Permalink
fix: warn user about old version of git when using mergetool
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralf Grubenmann committed Oct 10, 2023
1 parent db9f93b commit affc2a8
Showing 1 changed file with 7 additions and 0 deletions.
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 "
"git. Please try with a newer version."
)
# NOTE: cleanup worktree
try:
repository.remove_worktree(worktree_path)
Expand Down

0 comments on commit affc2a8

Please sign in to comment.