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

Incorrect GIT_WORK_DIR with fish #345

Open
jonathf opened this issue May 26, 2021 · 4 comments
Open

Incorrect GIT_WORK_DIR with fish #345

jonathf opened this issue May 26, 2021 · 4 comments

Comments

@jonathf
Copy link

jonathf commented May 26, 2021

Describe the bug

yadm lists all my tracked files as deleted when running yadm status in any folder except $HOME.

To reproduce

Can this be reproduced with the yadm/testbed docker image: No

testbed doesn't allow easy install of fish.

Steps to reproduce the behavior:

  1. Install fish and yadm
  2. yadm clone any/repo
  3. fish
  4. cd ~/.config
  5. yadm status

Expected behavior

yadm status should list current status of your dotfiles.
Instead it lists all dotfiles as deleted, as if the GIT_WORK_TREE=. is current directory instead of $HOME.
In other words, if you are in your $HOME folder, things works as expected.

Environment

  • Operating system: Arch Linux
  • Version yadm: 3.1.0
  • Version Git: 2.31.1
  • Fish version: 3.2.2
@jonathf jonathf added the bug label May 26, 2021
@tmewett
Copy link

tmewett commented Jun 1, 2021

To help bug-hunting: I cannot reproduce this with

  • OS: Debian 10
  • yadm 3.1.0
  • git 2.20.1
  • fish 3.0.2

@jonathf
Copy link
Author

jonathf commented Jun 15, 2021

I have a laptop with similar specs with Ubuntu. Also no issue.

Note that expliclitly setting $GIT_WORK_TREE also works. So for the time being, as a workaround, I have the following alias in my config.fish:

alias yadm="env GIT_WORK_TREE=$HOME yadm"

@github-actions
Copy link

This issue has been labeled as stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions
Copy link

This issue has been labeled as stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants