Bryan Turner <[email protected]> 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