update-ref: move transaction handling into `update_refs_stdin()`
authorPatrick Steinhardt <redacted>
Thu, 2 Apr 2020 07:09:53 +0000 (09:09 +0200)
committerJunio C Hamano <redacted>
Thu, 2 Apr 2020 18:09:48 +0000 (11:09 -0700)
commitde0e0d650a1c2afc81a4c5e8d37d266ffa2b8ccf
treedb7c29b7f3be626bb60d4ae6b3b22212d3dcb909
parent804dba54f5abdb35b5d15eed63625581c82697fb
update-ref: move transaction handling into `update_refs_stdin()`

While the actual logic to update the transaction is handled in
`update_refs_stdin()`, the transaction itself is started and committed
in `cmd_update_ref()` itself. This makes it hard to handle transaction
abortion and commits as part of `update_refs_stdin()` itself, which is
required in order to introduce transaction handling features to `git
update-refs --stdin`.

Refactor the code to move all transaction handling into
`update_refs_stdin()` to prepare for transaction handling features.

Signed-off-by: Patrick Steinhardt <redacted>
Signed-off-by: Junio C Hamano <redacted>
builtin/update-ref.c
git clone https://git.99rst.org/PROJECT