From: Vincent van Ravesteijn Date: Wed, 30 Nov 2011 05:54:38 GMT Subject: Re: [PATCH] Documentation update for 'git branch --list' Message-ID: <4ED5C51E.5070404@lyx.org> In-Reply-To: <7vobw4doey.fsf@alter.siamese.dyndns.org> Op 22-11-2011 19:04, Junio C Hamano schreef: > Vincent van Ravesteijn writes: > >> Op 21-11-2011 18:37, Junio C Hamano schreef: >> ... >>> It is natural to expect "git branch --merged pu vr/\*" to list branches >>> that are contained in 'pu' whose names match the given pattern, but it >>> seems to try creating a branch called "vr/*" and fails, for example. >> If this is what you naturally would expect, I would expect the >> following "git branch vr/*" to work as well. >> What would you say if we try to interpret the argument as a pattern >> when the argument is not a valid ref name? > We don't, as that is inviting mistakes. "git branch vr/*" if you have a > vr/ directory in your working tree may create vr/a branch from where the > tip of vr/b points at by mistake. > > The "--merged" option is an explicit clue that the user is not interested > in creating new branch, and the string being a pattern is additional clue. > The "--list" option was recently added for the explicit purpose of giving > such a clue as safety measure. Well, that was the answer that I foresaw. I will compose a patch implementing an at least consistent behaviour. Vincent