git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vincent van Ravesteijn <vfr@lyx.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, git@drmicha.warpmail.net
Subject: Re: [PATCH] Documentation update for 'git branch --list'
Date: Wed, 30 Nov 2011 06:54:38 +0100	[thread overview]
Message-ID: <4ED5C51E.5070404@lyx.org> (raw)
In-Reply-To: <7vobw4doey.fsf@alter.siamese.dyndns.org>

Op 22-11-2011 19:04, Junio C Hamano schreef:
> Vincent van Ravesteijn<vfr@lyx.org>  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

      reply	other threads:[~2011-11-30  5:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-21 14:33 [PATCH] Documentation update for 'git branch --list' Vincent van Ravesteijn
2011-11-21 15:00 ` Vincent van Ravesteijn
2011-11-21 17:37 ` Junio C Hamano
2011-11-22  6:40   ` Vincent van Ravesteijn
2011-11-22 18:04     ` Junio C Hamano
2011-11-30  5:54       ` Vincent van Ravesteijn [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ED5C51E.5070404@lyx.org \
    --to=vfr@lyx.org \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).