From: Chris Rorvick <chris@rorvick.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org,
Felipe Contreras <felipe.contreras@gmail.com>,
Michael Haggerty <mhagger@alum.mit.edu>,
Angelo Borsotti <angelo.borsotti@gmail.com>,
Philip Oakley <philipoakley@iee.org>,
Johannes Sixt <j6t@kdbg.org>,
Kacper Kornet <draenog@pld-linux.org>
Subject: Re: [PATCH v2 0/5] push: update remote tags only with force
Date: Fri, 9 Nov 2012 19:15:49 -0600 [thread overview]
Message-ID: <CAEUsAPbmimoEVoJjvXkOFacs-X6hu5b0NO1sHZ9eSSRM07yPFA@mail.gmail.com> (raw)
In-Reply-To: <20121109183834.GB22164@sigill.intra.peff.net>
On Fri, Nov 9, 2012 at 12:38 PM, Jeff King <peff@peff.net> wrote:
> On Sun, Nov 04, 2012 at 09:08:23PM -0600, Chris Rorvick wrote:
>
>> Patch series to prevent push from updating remote tags w/o forcing them.
>> Split out original patch to ease review.
>>
>> Chris Rorvick (5):
>> push: return reject reasons via a mask
>> push: add advice for rejected tag reference
>> push: flag updates
>> push: flag updates that require force
>> push: update remote tags only with force
>>
>> Documentation/git-push.txt | 10 +++++-----
>> builtin/push.c | 24 +++++++++++++++---------
>> builtin/send-pack.c | 6 ++++++
>> cache.h | 7 ++++++-
>> remote.c | 39 +++++++++++++++++++++++++++++++--------
>> t/t5516-fetch-push.sh | 30 +++++++++++++++++++++++++++++-
>> transport-helper.c | 6 ++++++
>> transport.c | 25 +++++++++++++++----------
>> transport.h | 10 ++++++----
>> 9 files changed, 119 insertions(+), 38 deletions(-)
>
> I have not looked carefully at this topic yet, but I did try merging it
> to "pu" and found that it had some textual conflicts with the
> nd/builtin-to-libgit topic, which moves some builtin/send-pack.c code to
> send-pack.c. Since I am graduating that topic to master, I went ahead
> and just rebased your topic on top.
>
> If you do a re-roll, please use an updated master, and feel free to
> grab (and double-check!) the rebase I am about to send out in 'pu'. I
> also included the minor signed/unsigned pointer warning fixup in the
> rebase, too.
>
> -Peff
Thanks, I've rebased and checked against the changes in pu. Looks
good to me. I have a couple of other minor fixes (see below for
details.) I'll include these in an update if there is sufficient
interest in this.
Chris
-- 8< --
diff --git a/remote.c b/remote.c
index fde2a79..b025a38 100644
--- a/remote.c
+++ b/remote.c
@@ -1351,9 +1351,8 @@ void set_ref_status_for_push(struct ref
*remote_refs, int send
if (ref->update) {
ref->nonfastforward =
- ref->update &&
- (!has_sha1_file(ref->old_sha1)
- || !ref_newer(ref->new_sha1, ref->old_sha1));
+ !has_sha1_file(ref->old_sha1)
+ || !ref_newer(ref->new_sha1, ref->old_sha1);
if (!ref->forwardable) {
ref->requires_force = 1;
diff --git a/transport.c b/transport.c
index c183971..a380ad7 100644
--- a/transport.c
+++ b/transport.c
@@ -749,7 +749,7 @@ void transport_print_push_status(const char *dest,
struct ref *r
else
*reject_mask |= REJECT_NON_FF_OTHER;
} else if (ref->status == REF_STATUS_REJECT_ALREADY_EXISTS) {
- *reject_mask |= REJECT_ALREADY_EXISTS;
+ *reject_mask |= REJECT_ALREADY_EXISTS;
}
}
}
prev parent reply other threads:[~2012-11-10 1:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-05 3:08 [PATCH v2 0/5] push: update remote tags only with force Chris Rorvick
2012-11-05 3:08 ` [PATCH v2 1/5] push: return reject reasons via a mask Chris Rorvick
2012-11-09 18:35 ` Jeff King
2012-11-05 3:08 ` [PATCH v2 2/5] push: add advice for rejected tag reference Chris Rorvick
2012-11-05 3:08 ` [PATCH v2 3/5] push: flag updates Chris Rorvick
2012-11-05 3:08 ` [PATCH v2 4/5] push: flag updates that require force Chris Rorvick
2012-11-05 3:08 ` [PATCH v2 5/5] push: update remote tags only with force Chris Rorvick
2012-11-09 18:38 ` [PATCH v2 0/5] " Jeff King
2012-11-10 1:15 ` Chris Rorvick [this message]
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=CAEUsAPbmimoEVoJjvXkOFacs-X6hu5b0NO1sHZ9eSSRM07yPFA@mail.gmail.com \
--to=chris@rorvick.com \
--cc=angelo.borsotti@gmail.com \
--cc=draenog@pld-linux.org \
--cc=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
--cc=j6t@kdbg.org \
--cc=mhagger@alum.mit.edu \
--cc=peff@peff.net \
--cc=philipoakley@iee.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).