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

Use relative path in git mv for cubids apply with --use-datalad #348

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion cubids/cubids.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,9 @@ def apply_tsv_changes(self, summary_tsv, files_tsv, new_prefix, raise_on_error=T
if Path(from_file).exists():
# if using datalad, we want to git mv instead of mv
if self.use_datalad:
move_ops.append(f"git mv {from_file} {to_file}")
move_ops.append(
f"git mv {os.path.relpath(from_file, str(self.path))} {to_file}"
)
else:
move_ops.append(f"mv {from_file} {to_file}")

Expand Down
Loading