Skip to content

convert errors if tempdir is on different filesystem #96

@lordkekz

Description

@lordkekz

Your project looks really exciting!

I was just trying it out, but there are some issues on my system. Here's one, which I may be able to send a PR for, but I want to report it first to get feedback on how you want to solve it.

My environment

I have my /tmp on a tmpfs and I use impermanence with btrfs to mount persistent directories (like git repos).

What happened

When I tried to run git prole convert (after #95), it failed with the following error:

$ git prole convert
• Converting ~/git to a worktree repository at ~/git/nixos-riscv.
  I'll move the following worktrees to new locations:
  • ~/git/nixos-riscv -> ~/git/nixos-riscv/master
  Additionally, I'll convert the repository to a bare repository.

Error:   × failed to rename file from /home/username/git/nixos-riscv/.git to /tmp/.tmp7ju3mQ/.git
  ╰─▶ Cross-device link (os error 18)

How to solve it

I haven't looked into the codebase enough, but I think that git-prole is trying to move the .git to a tempdir before it rearranges the current directory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions