From mboxrd@z Thu Jan 1 00:00:00 1970 From: Junio C Hamano Subject: Re: [PATCH] git-push: add a --delete flag to allow branch deletion Date: Thu, 19 Jun 2008 17:51:13 -0700 Message-ID: <7vej6tq67y.fsf@gitster.siamese.dyndns.org> References: <1213884787-24692-1-git-send-email-pdebie@ai.rug.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Git Mailinglist To: Pieter de Bie X-From: git-owner@vger.kernel.org Fri Jun 20 02:52:33 2008 Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1K9UrZ-0004ND-Pf for gcvg-git-2@gmane.org; Fri, 20 Jun 2008 02:52:26 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753063AbYFTAvb (ORCPT ); Thu, 19 Jun 2008 20:51:31 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752833AbYFTAvb (ORCPT ); Thu, 19 Jun 2008 20:51:31 -0400 Received: from a-sasl-fastnet.sasl.smtp.pobox.com ([207.106.133.19]:41859 "EHLO sasl.smtp.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752447AbYFTAva (ORCPT ); Thu, 19 Jun 2008 20:51:30 -0400 Received: from localhost.localdomain (localhost [127.0.0.1]) by a-sasl-fastnet.sasl.smtp.pobox.com (Postfix) with ESMTP id 235E81D2EB; Thu, 19 Jun 2008 20:51:23 -0400 (EDT) Received: from pobox.com (ip68-225-240-77.oc.oc.cox.net [68.225.240.77]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-sasl-fastnet.sasl.smtp.pobox.com (Postfix) with ESMTPSA id 232DC1D2EA; Thu, 19 Jun 2008 20:51:15 -0400 (EDT) In-Reply-To: <1213884787-24692-1-git-send-email-pdebie@ai.rug.nl> (Pieter de Bie's message of "Thu, 19 Jun 2008 16:13:07 +0200") User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) X-Pobox-Relay-ID: 010D6C82-3E63-11DD-88C0-CE28B26B55AE-77302942!a-sasl-fastnet.pobox.com Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Pieter de Bie writes: > diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt > index 89e0049..6a772a5 100644 > --- a/Documentation/git-push.txt > +++ b/Documentation/git-push.txt > @@ -11,6 +11,8 @@ SYNOPSIS > [verse] > 'git-push' [--all] [--dry-run] [--tags] [--receive-pack=] > [--repo=all] [-f | --force] [-v | --verbose] [ ...] > +'git push' --delete [ ...] > + > > DESCRIPTION > ----------- > @@ -18,6 +20,8 @@ DESCRIPTION > Updates remote refs using local refs, while sending objects > necessary to complete the given refs. > > +In the second form, deletes one or more branches on a given repository. > + Is this really about branches? Is it usable to somehow delete tags, and if so how? What happens if you have a branch 'foo' and a tag 'foo' in the remote repository and you say "git push --delete $there foo"? > @@ -125,6 +146,18 @@ int cmd_push(int argc, const char **argv, const char *prefix) > > argc = parse_options(argc, argv, options, push_usage, 0); > > + if (delete) { > + if (all || mirror || tags || force || repo) > + die("--delete cannot be used with --all, --mirror, --tags, --farce or --repo"); Nice try, but it is not so amusing.