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 "yadm clone" from within a subdir of $YADM_WORK #333

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

cwarlich
Copy link

What does this PR do?

When running "yadm clone" from a subdirectory of $YADM_WORK, e.g. from
$HOME/Music, YADM failed to populate its working context: The list of
files returned by the subsequent "git ls-files --deleted" (within the yadm script)
was empty then.

Previous Behavior

When doing a "yadm clone" while the current working directory is a subdir
of $YADM_WORK, the working context in $YADM_WORK is not populated
with the files from the dotfile repository.

New Behavior

Everything works fine even when being in a subdirectory of $YADM_WORK.

Have [tests][1] been written for this change?

No, but all current tests passed.

Have these commits been [signed with GnuPG][2]?

No

When running "yadm clone" from a subdirectory of $YADM_WORK, e.g. from
$HOME/Music, YADM failed to populate its working context: The list of
files returned by the subsequent "git ls-files --deleted" was empty then.
@github-actions github-actions bot added the stale label Dec 28, 2021
@TheLocehiliosan TheLocehiliosan changed the base branch from master to develop December 31, 2021 06:00
@TheLocehiliosan TheLocehiliosan self-assigned this Dec 31, 2021
@Oddegamra
Copy link

Oddegamra commented Nov 18, 2022

I believe that this closing this pull request might also fix #345, since I was running into the same problem while also using fish. The underlying cause of the issue however most likely has nothing to do with fish at all - but not being in $HOME when doing yadm clone. Since the index is not properly reset, no files are copied during clone, and all files are marked as deleted afterwards - since they haven't been copied after all.

@mweberjc
Copy link

mweberjc commented Jun 2, 2023

running into this as well. Is there anything else needed before merging this PR?

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

Successfully merging this pull request may close these issues.

4 participants