From: Junio C Hamano <gitster@pobox•com>
To: Ronnie Sahlberg <sahlberg@google•com>
Cc: git@vger•kernel.org
Subject: Re: [PATCH 2/8] send-pack.c: add an --atomic-push command line argument
Date: Thu, 30 Oct 2014 13:04:26 -0700 [thread overview]
Message-ID: <xmqqioj1uxx1.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1413924400-15418-3-git-send-email-sahlberg@google.com> (Ronnie Sahlberg's message of "Tue, 21 Oct 2014 13:46:34 -0700")
Ronnie Sahlberg <sahlberg@google•com> writes:
> diff --git a/Documentation/git-send-pack.txt b/Documentation/git-send-pack.txt
> index 2a0de42..8f64feb 100644
> --- a/Documentation/git-send-pack.txt
> +++ b/Documentation/git-send-pack.txt
> @@ -9,7 +9,7 @@ git-send-pack - Push objects over Git protocol to another repository
> SYNOPSIS
> --------
> [verse]
> -'git send-pack' [--all] [--dry-run] [--force] [--receive-pack=<git-receive-pack>] [--verbose] [--thin] [<host>:]<directory> [<ref>...]
> +'git send-pack' [--all] [--dry-run] [--force] [--receive-pack=<git-receive-pack>] [--verbose] [--thin] [--atomic-push] [<host>:]<directory> [<ref>...]
>
> DESCRIPTION
> -----------
> @@ -62,6 +62,11 @@ be in a separate packet, and the list must end with a flush packet.
> Send a "thin" pack, which records objects in deltified form based
> on objects not included in the pack to reduce network traffic.
>
> +--atomic-push::
> + With atomic-push all refs are updated in one single atomic transaction.
> + This means that if any of the refs fails then the entire push will
> + fail without changing any refs.
Whenever you say "This means that", please read it twice to see if
everything before and including that phrase can be removed. It is a
sign that you found what you wrote before it is not understandable
and what follows is the version that would be understood by the
readers.
> @@ -203,6 +203,13 @@ static int ref_update_to_be_sent(const struct ref *ref, const struct send_pack_a
> case REF_STATUS_REJECT_NEEDS_FORCE:
> case REF_STATUS_REJECT_STALE:
> case REF_STATUS_REJECT_NODELETE:
> + if (atomic_push_failed && args->use_atomic_push) {
Hmph. Can we even get atomis_push_failed when args->use_atomic_push
is not set?
> + fprintf(stderr, "Atomic push is not possible "
> + "for ref %s. Status:%d\n", ref->name,
> + ref->status);
> + *atomic_push_failed = 1;
> + }
> + /* fallthrough */
Is this "is not possible" (hence we do not let the user use it), or
"failed" (i.e. we tried and we failed)?
next prev parent reply other threads:[~2014-10-30 20:04 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-21 20:46 [PATCH 0/8] ref-transaction-send-pack Ronnie Sahlberg
2014-10-21 20:46 ` [PATCH 1/8] receive-pack.c: add protocol support to negotiate atomic-push Ronnie Sahlberg
2014-10-30 19:59 ` Junio C Hamano
2014-10-30 20:46 ` Ronnie Sahlberg
2014-10-21 20:46 ` [PATCH 2/8] send-pack.c: add an --atomic-push command line argument Ronnie Sahlberg
2014-10-30 20:04 ` Junio C Hamano [this message]
2014-10-30 21:21 ` Ronnie Sahlberg
2014-10-21 20:46 ` [PATCH 3/8] receive-pack.c: use a single transaction when atomic-push is negotiated Ronnie Sahlberg
2014-10-30 20:05 ` Junio C Hamano
2014-10-21 20:46 ` [PATCH 4/8] push.c: add an --atomic-push argument Ronnie Sahlberg
2014-10-21 20:46 ` [PATCH 5/8] t5543-atomic-push.sh: add basic tests for atomic pushes Ronnie Sahlberg
2014-10-21 20:46 ` [PATCH 6/8] receive-pack.c: add a receive.preferatomicpush configuration variable Ronnie Sahlberg
2014-10-30 20:11 ` Junio C Hamano
2014-10-30 21:36 ` Ronnie Sahlberg
2014-10-30 22:03 ` Junio C Hamano
2014-10-30 22:26 ` Ronnie Sahlberg
2014-10-21 20:46 ` [PATCH 7/8] refs.c: add an err argument to create_reflog Ronnie Sahlberg
2014-10-21 20:46 ` [PATCH 8/8] refs.c: add an err argument to create_symref 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=xmqqioj1uxx1.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=sahlberg@google$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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