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

Re: [PATCH] git-push: add a --delete flag to allow branch deletion

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 20, 2008, 00:51 UTC
Message-ID
<7vej6tq67y.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<1213884787-24692-1-git-send-email-pdebie@ai.rug.nl>
Pieter de Bie <pdebie@ai.rug.nl> writes:
Show 19 quoted lines
> 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=<git-receive-pack>]
>             [--repo=all] [-f | --force] [-v | --verbose] [<repository> <refspec>...]
> +'git push' --delete <repository> <branchname> [<branch2> ...]
> +
>  
>  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"?

Show 7 quoted lines
> @@ -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.
Previous: Sverre Rabbelier
Message 5 of 5 in “git-push: add a --delete flag to allow branch deletion”
  1. git-push: add a --delete flag to allow branch deletionPieter de Bie, Jun 19, 2008
  2. Andreas EricssonJun 19, 2008
  3. Pieter de BieJun 19, 2008
  4. Sverre RabbelierJun 19, 2008
  5. Junio C HamanoJun 20, 2008

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.