git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 4/5] receive-pack.c: add receive.atomicpush configuration option

From
Ronnie Sahlberg <sahlberg@google.com>
Date
Jul 31, 2014, 21:39 UTC
Message-ID
<1406842751-6657-5-git-send-email-sahlberg@google.com>
In-Reply-To
<1406842751-6657-1-git-send-email-sahlberg@google.com>
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.528.gd0e7a84
Previous: Ronnie SahlbergNext: Ronnie Sahlberg
Message 5 of 7 in “ref-transactions-send-pack”
  1. 0/5 ref-transactions-send-packRonnie Sahlberg, Jul 31, 2014
  2. 1/5 receive-pack.c: add protocol support to negotiate atomic-pushRonnie Sahlberg, Jul 31, 2014
  3. 2/5 send-pack.c: add an --atomic-push command line argumentRonnie Sahlberg, Jul 31, 2014
  4. 3/5 receive-pack.c: use a single transaction when atomic-push is negotiatedRonnie Sahlberg, Jul 31, 2014
  5. 4/5 receive-pack.c: add receive.atomicpush configuration optionRonnie Sahlberg, Jul 31, 2014
  6. 5/5 push.c: add an --atomic-push argumentRonnie Sahlberg, Jul 31, 2014
  7. Ronnie SahlbergAug 8, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.