Re: [PATCH] branch doc: Change `git branch <pattern>` to use `<branchname>`
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 23, 2017, 19:01 UTC
- Message-ID
- <xmqqo9wrddgv.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <5d04c82c-45a4-5d5e-0317-511587ee3474@ramsayjones.plus.com>
Ramsay Jones <ramsay@ramsayjones.plus.com> writes:
Show 19 quoted lines
>> I am not sure if it makes that much sense to have that sentence here >> in the first place (after all, it is describing a behaviour of a >> mode that is *not* the list mode), but I guess that it may be a >> common mistake to forget to specify "-l" while asking for branches >> that match the pattern? If we were writing this today from scratch, >> I would perhaps write something entirely different, e.g. >> >> --list:: >> List branches. With optional <pattern>... at the >> end of the command line, list only the branches that >> match any of the given patterns. Do not forget '-l' >> and say "git branch <pattern>", as it will instead >> try to create a new branch whose name is <pattern>, >> which is a common mistake. > > Hmm, but with git-branch -l means --create-reflog not --list. > > I have make the mistake of using -l rather than --list several > times ... :D
That too. With "Do not forget '--list'..." and it will make it correct again ;-).