summaryrefslogtreecommitdiff
path: root/t/t4068-diff-symmetric-merge-base.sh
diff options
context:
space:
mode:
authorLibravatar Patrick Steinhardt <ps@pks.im>2021-01-12 13:27:48 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-01-12 12:06:15 -0800
commitd4c8db8f1b43cb26efdd53d74afce60e6d9d195a (patch)
tree391335383c935a7104286d2ea8073121bab6e9d6 /t/t4068-diff-symmetric-merge-base.sh
parentfetch: refactor `s_update_ref` to use common exit path (diff)
downloadtgif-d4c8db8f1b43cb26efdd53d74afce60e6d9d195a.tar.xz
fetch: allow passing a transaction to `s_update_ref()`
The handling of ref updates is completely handled by `s_update_ref()`, which will manage the complete lifecycle of the reference transaction. This is fine right now given that git-fetch(1) does not support atomic fetches, so each reference gets its own transaction. It is quite inflexible though, as `s_update_ref()` only knows about a single reference update at a time, so it doesn't allow us to alter the strategy. This commit prepares `s_update_ref()` and its only caller `update_local_ref()` to allow passing an external transaction. If none is given, then the existing behaviour is triggered which creates a new transaction and directly commits it. Otherwise, if the caller provides a transaction, then we only queue the update but don't commit it. This optionally allows the caller to manage when a transaction will be committed. Given that `update_local_ref()` is always called with a `NULL` transaction for now, no change in behaviour is expected from this change. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4068-diff-symmetric-merge-base.sh')
0 files changed, 0 insertions, 0 deletions