From: Kyle Meyer <kyle@kyleam.com>
To: Bryan Turner <bturner@atlassian.com>
Cc: Junio C Hamano <gitster@pobox.com>, Git Users <git@vger.kernel.org>
Subject: Re: name-rev: anchor pattern without --exclude?
Date: Thu, 06 Jul 2017 14:26:21 -0400 [thread overview]
Message-ID: <87eftttoaa.fsf@kyleam.com> (raw)
In-Reply-To: <CAGyf7-HiwR+CDtDCvQ7q9Dd_TYfvN0133UOYTO65F=4qOHqy9w@mail.gmail.com>
Bryan Turner <bturner@atlassian.com> writes:
[...]
> If you don't need the ancestor traversals "git name-rev" provides,
> "git for-each-ref --count 1 --format "%(refname:short)" --points-at
> <hash> refs/heads/" might work. That only goes back to Git 2.7.0,
> though; still quite a ways off your 1.9 target. ("git branch
> --points-at" does the same thing, I should add, and only for branches,
> but you can't directly limit its output like you can with
> "for-each-ref".. Perhaps that doesn't matter for your use case.) If
> you want names like "master~2", from your example, though,
> "--points-at" won't do what you need.
Thanks for the suggestion. Unfortunately, I do want to consider names
like "master~2". I was just hoping that I had overlooked another way to
achieve the
git name-rev --refs="refs/heads/*" --exclude="*/refs/heads/*" <commit>
example I gave in my initial post.
--
Kyle
prev parent reply other threads:[~2017-07-06 18:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-06 16:53 name-rev: anchor pattern without --exclude? Kyle Meyer
2017-07-06 17:03 ` Junio C Hamano
2017-07-06 17:23 ` Kyle Meyer
2017-07-06 18:02 ` Bryan Turner
2017-07-06 18:26 ` Kyle Meyer [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=87eftttoaa.fsf@kyleam.com \
--to=kyle@kyleam.com \
--cc=bturner@atlassian.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.