mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-16 00:00:37 +08:00
Two tests assumed that `refs/remotes/rad/HEAD` would automatically be crated. It turns out, however, that this only the case if executed with Git 2.48.0 or newer. Git versions older than 2.48.0 do not touch 'refs/remotes/<remote>/HEAD'. Git 2.48.0 and newer will update `refs/remotes/<remote>/HEAD` by default. This can be disabled by setting `remote.<remote>.followRemoteHEAD` to "never". Thus, with these versions, setting that configuration to "never" emulates the behaviour of older versions. Therefore, to ensure that test results are consistent across Git versions before and after 2.48.0, the fixture of test repositories now include setting 'remote.rad.followRemoteHEAD = never'. The affected tests are adjusted accordingly. This change can possibly be reverted once Radicle requires usage of Git 2.48.0 or newer. Co-authored-by: Lorenz Leutgeb <lorenz.leutgeb@radicle.xyz>
673 B
673 B
Ensure that we're able to pull our own branches if they happened to be deleted in our working copy. This also applies to a situation with multiple working copies.
$ git checkout -b alice/1 -q
$ git commit --allow-empty -m "Changes #1" -q
$ git push rad -o patch.message="Changes" HEAD:refs/patches
$ git checkout master -q
$ git branch -D alice/1 -q
$ git update-ref -d refs/remotes/rad/alice/1
$ git update-ref -d refs/remotes/rad/patches/5e2dedcc5d515fcbc1cca483d3376609fe889bfb
$ git gc --prune=now
$ git branch -r
rad/master
$ git pull
Already up to date.
$ git branch -r
rad/master
rad/patches/5e2dedcc5d515fcbc1cca483d3376609fe889bfb