From: Ronnie Sahlberg <sahlberg@google.com>
To: git@vger.kernel.org
Cc: Ronnie Sahlberg <sahlberg@google.com>
Subject: [PATCH 4/5] receive-pack.c: add receive.atomicpush configuration option
Date: Tue, 19 Aug 2014 09:24:50 -0700 [thread overview]
Message-ID: <1408465491-25488-5-git-send-email-sahlberg@google.com> (raw)
In-Reply-To: <1408465491-25488-1-git-send-email-sahlberg@google.com>
Add a configuration argument to the receive side to force atomic pushes
for all pushes to the repo.
Signed-off-by: Ronnie Sahlberg <sahlberg@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
next prev parent reply other threads:[~2014-08-19 16:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-19 16:24 [PATCH 0/5] ref-transactions-send-pack Ronnie Sahlberg
2014-08-19 16:24 ` [PATCH 1/5] receive-pack.c: add protocol support to negotiate atomic-push Ronnie Sahlberg
2014-08-19 16:24 ` [PATCH 2/5] send-pack.c: add an --atomic-push command line argument Ronnie Sahlberg
2014-08-19 16:24 ` [PATCH 3/5] receive-pack.c: use a single transaction when atomic-push is negotiated Ronnie Sahlberg
2014-08-19 16:24 ` Ronnie Sahlberg [this message]
2014-08-19 16:24 ` [PATCH 5/5] push.c: add an --atomic-push argument Ronnie Sahlberg
-- strict thread matches above, loose matches on Subject: below --
2014-07-31 21:39 [PATCH 0/5] ref-transactions-send-pack Ronnie Sahlberg
2014-07-31 21:39 ` [PATCH 4/5] receive-pack.c: add receive.atomicpush configuration option Ronnie Sahlberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1408465491-25488-5-git-send-email-sahlberg@google.com \
--to=sahlberg@google.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).