[PATCH 4/5] receive-pack.c: add receive.atomicpush configuration option
Add a configuration argument to the receive side to force atomic pushes for all pushes to the repo. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- Documentation/config.txt | 5 + builtin/receive-pack.c | 5 + 2 files changed, 10 insertions(+) diff --git a/Documentation/config.txt b/Documentation/config.txt index 1d718bd..75ce157 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -2038,6 +2038,11 @@ rebase.autostash:: successful rebase might result in non-trivial conflicts. Defaults to false. +receive.atomicpush:: + By default, git-receive-pack will only use atomic ref transactions + if the client negotiates it. When set to true, git-receive-pack + will force atomic ref updates for all client pushes. + receive.autogc:: By default, git-receive-pack will run git-gc --auto after receiving data from git-push and updating refs. You can stop diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index 47f778d..9fa637a 100644 --- a/builtin/receive-pack.c +++ b/builtin/receive-pack.c @@ -132,6 +132,11 @@ static int receive_pack_config(const char *var, const char *value, void *cb) return 0; } + if (strcmp(var, receive.atomicpush) == 0) { + use_atomic_push = git_config_bool(var, value); + return 0; + } + return git_default_config(var, value, cb); } -- 2.0.1.556.ge8f7cba.dirty -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 4/5] receive-pack.c: add receive.atomicpush configuration option
Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- Documentation/config.txt | 5 + builtin/receive-pack.c | 5 + 2 files changed, 10 insertions(+) diff --git a/Documentation/config.txt b/Documentation/config.txt index 1d718bd..75ce157 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -2038,6 +2038,11 @@ rebase.autostash:: successful rebase might result in non-trivial conflicts. Defaults to false. +receive.atomicpush:: + By default, git-receive-pack will only use atomic ref transactions + if the client negotiates it. When set to true, git-receive-pack + will force atomic ref updates for all client pushes. + receive.autogc:: By default, git-receive-pack will run git-gc --auto after receiving data from git-push and updating refs. You can stop diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index 47f778d..9fa637a 100644 --- a/builtin/receive-pack.c +++ b/builtin/receive-pack.c @@ -132,6 +132,11 @@ static int receive_pack_config(const char *var, const char *value, void *cb) return 0; } + if (strcmp(var, receive.atomicpush) == 0) { + use_atomic_push = git_config_bool(var, value); + return 0; + } + return git_default_config(var, value, cb); } -- 2.0.1.528.gd0e7a84 -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html