git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: William Blevins <wblevins001@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: Unexpected (bug-like) behavior in `git ls-remote` matching.
Date: Wed, 8 Feb 2023 08:49:57 -0500	[thread overview]
Message-ID: <CALJHx12DetwZ=+aMEG6Ss4P3fMTeLN2styXuPw93C5N6yg98NA@mail.gmail.com> (raw)
In-Reply-To: <xmqqedr0vd1l.fsf@gitster.g>

This still feels "weird" to me. Other pattern matching tools like grep
and sed don't have exceptions to their behavior like this.

Can you reference the unit tests that verifies this specific behavior?

On Wed, Feb 8, 2023 at 2:20 AM Junio C Hamano <gitster@pobox.com> wrote:
>
> William Blevins <wblevins001@gmail.com> writes:
>
> > What is totally unexpected.... is the most simple search for ABC-1...
> > ```
> > $ git ls-remote --heads git@github.com:owner/repo.git ABC-1
> > <ref>    refs/head/ABC-1
> > <ref>    refs/head/feature/ABC-1
> > ```
>
> Sorry, but I cannot see what is surprising about the above.  If you
> have these branches locally, you should also see these refs in the
> output of "git show-ref ABC-1".  Refname hierarchies work just like
> pathnames with directories, and without glob in the pattern, tail
> matching that honors path component boundary is very much the norm
> in the oldest part of Git, i.e. ABC-1 matches refs/heads/ABC-1 but
> not refs/heads/XABC-1.

  reply	other threads:[~2023-02-08 13:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-07 23:03 Unexpected (bug-like) behavior in `git ls-remote` matching William Blevins
2023-02-08  7:20 ` Junio C Hamano
2023-02-08 13:49   ` William Blevins [this message]
2023-02-08 14:51     ` Philip Oakley
2023-02-08 16:30     ` Jeff King
2023-02-08 16:33       ` Jeff King
2023-02-08 17:46         ` Junio C Hamano
2023-02-08 17:40       ` Junio C Hamano
2023-02-09 13:15         ` Jeff King
2023-02-09 19:43           ` Junio C Hamano
2023-02-11  2:41             ` Jeff King
2023-02-11  2:44               ` [PATCH 1/2] doc/ls-remote: cosmetic cleanups for examples Jeff King
2023-02-11  2:44               ` [PATCH 2/2] doc/ls-remote: clarify pattern format Jeff King
2023-02-11  2:54                 ` Junio C Hamano
2023-02-11  4:52                   ` [PATCH v2 " Jeff King
2023-02-08 14:08 ` Unexpected (bug-like) behavior in `git ls-remote` matching Ævar Arnfjörð Bjarmason

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to='CALJHx12DetwZ=+aMEG6Ss4P3fMTeLN2styXuPw93C5N6yg98NA@mail.gmail.com' \
    --to=wblevins001@gmail.com \
    --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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).