diff --git a/changelog.d/20231025_194118_michael.hanke_bf_7507.md b/changelog.d/20231025_194118_michael.hanke_bf_7507.md new file mode 100644 index 0000000000..85bc45b80e --- /dev/null +++ b/changelog.d/20231025_194118_michael.hanke_bf_7507.md @@ -0,0 +1,6 @@ +### 🐛 Bug Fixes + +- Update target detection for adjusted mode datasets has been improved. + Fixes [#7507](https://github.com/datalad/datalad/issues/7507) via + [PR #7522](https://github.com/datalad/datalad/pull/7522) + (by [@mih](https://github.com/mih)) diff --git a/datalad/distribution/update.py b/datalad/distribution/update.py index 28a33bda39..2fc2235e33 100644 --- a/datalad/distribution/update.py +++ b/datalad/distribution/update.py @@ -481,7 +481,7 @@ def _choose_update_target(repo, branch, remote, cfg_remote): # branch.*.merge value, but that assumes a value for remote.*.fetch. target = repo.call_git_oneline( ["rev-parse", "--symbolic-full-name", "--abbrev-ref=strict", - "@{upstream}"], + f"{repo.get_corresponding_branch(branch) or ''}" "@{upstream}"], read_only=True) elif branch: remote_branch = "{}/{}".format(remote, branch)