1
0
Fork 0
mirror of synced 2024-12-04 06:35:36 -05:00

Compare commits

...

3 commits

Author SHA1 Message Date
AVM.Martin
ae3a149449
style: use pathspec for consistency 2024-11-26 19:22:18 +07:00
AVM.Martin
85e8c1ddfc
docs: fix comment 2024-11-26 19:21:18 +07:00
AVM.Martin
a7939bec7b
style: join arguments 2024-11-26 19:20:59 +07:00
2 changed files with 3 additions and 4 deletions

View file

@ -343,14 +343,13 @@ def test_clone_subdirectory(runner, paths, yadm_cmd, repo_config):
remote_url = f"file://{paths.remote}"
# run the clone command
args = ["clone", "-w", paths.work]
args += [remote_url]
args = ["clone", "-w", paths.work, remote_url]
run = runner(command=yadm_cmd(*args), cwd=subdir)
# clone should succeed, and repo should be configured properly
assert successful_clone(run, paths, repo_config)
# test that the conflicts are preserved in the work tree
# ensure that no changes found as this is a clean dotfiles clone
run = runner(command=yadm_cmd("status", "-uno", "--porcelain"), cwd=subdir)
assert run.success
assert run.out == ""

2
yadm
View file

@ -827,7 +827,7 @@ function clone() {
rm -rf "$wc"
# then reset the index as the --no-checkout flag makes the index empty
"$GIT_PROGRAM" reset --quiet -- "$YADM_WORK"
"$GIT_PROGRAM" reset --quiet -- ":/"
if [ "$YADM_WORK" = "$HOME" ]; then
debug "Determining if repo tracks private directories"