Earlier quoted context omitted.
Revsets are a wonderful feature, and it's something I wish git had. Just being able to say I want to see what has changed between this branch head and its latest common ancestor with trunk is an incredibly simple and useful thing to be able to do.
Complete guess based on [1], but wouldn't git diff HEAD $(git merge-base HEAD master) work? [1]: https://stackoverflow.com/questions/1549146/find-common-ance...
A Git query language
31–40 of 72 posts
Re: A Git query language
#32Re: A Git query language
#33This might benefit from SQLite's Virtual tables: https://sqlite.org/vtab.html With Virtual Tables you can expose any data source as a SQLite table -- then you can use every SQL feature that sqlite offers. You can just tell sqlite how to iterate through your data with a few functions, with an option to push down filtering information for efficiency. You can also create your own aggregates, functions etc. Here's an art…
Re: A Git query language
#34active gitql https://github.com/gitql/gitql
Re: A Git query language
#35Earlier quoted context omitted.
Mercurial's are completely general, though. Any Mercurial command that can accept a revision as an argument can also accept a revset expression. And templating isn't just for log, but for many other commands, such as grep or annotate (blame), and it's the same templating language for all of them. I also find hg templates a bit easier to read, because they're Djangoish/Jinjaish instead of being printf-ish like git's.…
Revsets are a wonderful feature, and it's something I wish git had. Just being able to say I want to see what has changed between this branch head and its latest common ancestor with trunk is an incredibly simple and useful thing to be able to do.
Re: A Git query language
#36Earlier quoted context omitted.
Revsets are a wonderful feature, and it's something I wish git had. Just being able to say I want to see what has changed between this branch head and its latest common ancestor with trunk is an incredibly simple and useful thing to be able to do.
You can do that! "master..experiment" means "all commits reachable by experiment that aren’t reachable by master" https://git-scm.com/book/en/v2/Git-Tools-Revision-Selection
Re: A Git query language
#37Earlier quoted context omitted.
Revsets are a wonderful feature, and it's something I wish git had. Just being able to say I want to see what has changed between this branch head and its latest common ancestor with trunk is an incredibly simple and useful thing to be able to do.
Complete guess based on [1], but wouldn't git diff HEAD $(git merge-base HEAD master) work? [1]: https://stackoverflow.com/questions/1549146/find-common-ance...
Mercurial's API (i.e. the CLI) makes a point of being usable with powershell and cmd.exe, which I think some Windows users appreciate.
Re: A Git query language
#38Earlier quoted context omitted.
You can do that! "master..experiment" means "all commits reachable by experiment that aren’t reachable by master" https://git-scm.com/book/en/v2/Git-Tools-Revision-Selection
I believe the goal is to get a diff, not a list of commits, in which case you need to figure out an expression for getting the last commit common to master and experiment so you can diff it with experiment.
Re: A Git query language
#39The syntax seems close enough that this could just replace it, though:
ls commits | where date Re: A Git query language
#40 select author, message
from commits
where 'Fuck' in message
I'm pretty sure that query's results would fill my screen buffer.