receive-pack.c: add execute_commands_atomic function
commit68deed298ac4c257cd72d6bee543f651cb10d669
authorStefan Beller <sbeller@google.com>
Thu, 8 Jan 2015 03:23:19 +0000 (7 19:23 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 8 Jan 2015 03:56:43 +0000 (7 19:56 -0800)
treecc7b377b341e463b18c0a6efb76605f273819977
parent222368c6456211a3b2054ce4651cb58703886965
receive-pack.c: add execute_commands_atomic function

This introduces the new function execute_commands_atomic which will use
one atomic transaction for all updates. The default behavior is still
the old non atomic way, one ref at a time. This is to cause as little
disruption as possible to existing clients. It is unknown if there are
client scripts that depend on the old non-atomic behavior so we make it
opt-in for now.

A later patch will add the possibility to actually use the functionality
added by this patch. For now use_atomic is always 0.

Inspired-by: Ronnie Sahlberg <sahlberg@google.com>
Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/receive-pack.c