Thread (4 messages) flat view 4 messages, 2 authors, 2016-08-11

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

From: Quy Tonthat <hidden>
Date: 2016-08-11 19:50:12

Possibly related (same subject, not in this thread)

Junio C Hamano wrote:
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help