Earlier quoted context omitted.
Also the revsets, while they're relatively recent in the grand scheme of things (hg 1.6 circa 2010) I so miss these when I have to use (or even read the man page of) the garbage fire that is `git log` (templates also help)
How much of the hg revset functionality could be implemented for git, without writing any C? Is the revset feature basically a DSL for specifying queries, and are the queries thus-specified ones that have direct analogs in git and can be done in git using git's API?
Yes, it's a way to select sets of revisions by filtering and merging existing sets.
> and are the queries thus-specified ones that have direct analogs in git and can be done in git using git's API?
I don't think so, not all of the filter operations are available, but more importantly I don't think git supports arbitrary sets of revisions, only fairly basic relatively continuous ranges (that's the idea I get from gitrevisions(7) anyway)