Comments (2)
I've added initial support for revsets over the last week or two.
There's now support for looking up a single commit by git ref, such as jj diff -r origin/main
(yes, there was no support for that until last week).
There is also support for looking up multiple commits. jj log
gained a -r
flag that can be passed a revset. Some valid revset functions are all_heads()
(including those normally hidden), non_obsolete_heads()
(the heads of the graph that jj log
show you by default), public_heads()
. The supported operators are :foo
for parents, foo:
for children, *:foo
for ancestors and foo:*
for descendants.
from jj.
There are some basic revset functions and operators and I think we can consider this done. There are of course tons of other revsets we'll want to add, but we can do that as we find a need for them. What we have now is at least enough for me to define the aliases I need for jj log
etc.
The operators that exist now are:
parents: :foo
children: foo:
ancestors: ,,foo
descendants: foo,,
DAG range: foo,,bar
(like hg's foo::bar
)
range: foo,,,bar
(like git's foo..bar
)
union: foo | bar
intersection: foo & bar
difference foo - bar
Functions:
parents(<set>)
ancestors(<set>)
children(<set>)
descendants(<set>)
all_heads()
non_obsolete_heads()
public_heads()
git_refs()
merges()
description(<needle>)
I have not added any revsets for precursors or successors. I also haven't made any optimizations (e.g. rewriting ,,bar - ,,foo
as foo,,,bar
).
from jj.
Related Issues (20)
- `jj ci -i` and `jj split`: permission changes HOT 5
- Panic while executing `jj log` HOT 4
- FR: zsh completion `ff move --to <TAB>` HOT 3
- FR: Fix inconsistencies in how subcommands handle revision and path args HOT 16
- Gmail google account HOT 1
- FR: `jj util stale diff` and `jj util stale status` HOT 2
- `jj diff --stat` and `jj diff -s` do not print a final newline HOT 3
- FR: `resolve` flag to select the first conflicted commit on a branch HOT 5
- FR: Add a "--tool" flag to resolve HOT 7
- FR: Add an option "jj rebase --skip_empty" or similar HOT 5
- scm-record integration: interactive split HOT 2
- `jj` unexpectedly simplifies ancestry when rewriting a commit that is both a direct child and an indirect descendant of another commit HOT 13
- Panic during an incomplete conflict resolution HOT 1
- Initially-gitignored file continually reappears (with watchman) HOT 4
- "Error: Failed to run editor" on Windows HOT 3
- FR: Allow creating default flags per command HOT 1
- FR: A `hidden()` revset HOT 1
- Can't push changes to a repo that already has a change with an empty log message HOT 7
- `jj rebase -r A -d descendant_of_A` can panic if the graph has weird ancestry. HOT 5
- thread 'main' panicked at 'commit.secure_sig was set', lib/src/git_backend.rs:909:9 HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jj.