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

Re: [PATCH] git-branch: deleting remote branches in new layout

From
QTQuy Tonthat <qtonthat@gmail.com>
Date
Dec 18, 2006, 10:02 UTC
Message-ID
<4586671D.5020305@gmail.com>
In-Reply-To
<7vodq11w49.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
Show 12 quoted lines
> How about this instead?
> 
> Because -r already means "remote" when listing, you can say:
> 
> 	$ git branch -d -r origin/todo origin/html origin/man
> 
> I just twisted it not to do fast-forward check with the current
> branch, because remote tracking branches are more like tags than
> branches, and when you are removing them, most likely that is
> not because you are "done with" them (for a local branch, it
> usually means "you merged it up") but because you are not even
> interested in them.
It sure is much more unambiguous that way.

Users won't be able to mix "local" and "remote" on one command line as they were with the old layout. But that's OK for such an infrequently used command.

>  		if (!resolve_ref(name, sha1, 1, NULL))
> -			die("Branch '%s' not found.", argv[i]);
> +			die("%sbranch '%s' not found.", remote, argv[i]);

This should not be a fatal error. We should only give warning and move on to the next item. The way "rm" does.

Quy
Previous: Junio C HamanoNext: Quy Tonthat
Message 4 of 6 in “git-branch: deleting remote branches in new layout”
  1. git-branch: deleting remote branches in new layoutQuy Tonthat, Dec 18, 2006
  2. Junio C HamanoDec 18, 2006
  3. Junio C HamanoDec 18, 2006
  4. Quy TonthatDec 18, 2006
  5. Quy TonthatDec 18, 2006
  6. Quy TonthatDec 18, 2006

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.