Skip to content

Fails to clone (and possibly other operations) when path is based on ~ #731

Closed
@yarikoptic

Description

@yarikoptic
$> python -c 'from git import Repo; Repo.clone_from("~/deb/gits/python-git", "/tmp/ttt")'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "git/repo/base.py", line 982, in clone_from
    return cls._clone(git, url, to_path, GitCmdObjectDB, progress, **kwargs)
  File "git/repo/base.py", line 933, in _clone
    finalize_process(proc, stderr=stderr)
  File "git/util.py", line 336, in finalize_process
    proc.wait(**kwargs)
  File "git/cmd.py", line 418, in wait
    raise GitCommandError(self.args, status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
  cmdline: git clone -v ~/deb/gits/python-git /tmp/ttt
  stderr: 'fatal: repository '~/deb/gits/python-git' does not exist
'
$> python -c 'from git import Repo; Repo.clone_from("/home/yoh/deb/gits/python-git", "/tmp/ttt")' 

$> git describe
2.1.8-2-g8f76463

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions