Yuya Nishihara
459e9174ad
dag_walk: remove unneeded trait bound on node type
2023-06-11 11:38:03 +09:00
Yuya Nishihara
78a64edb22
dag_walk: rename bfs() to dfs() because it's depth-first
...
No callers appear to rely on traversal order, so let's just fix the function
name. Maybe it was a typo.
2023-06-04 11:47:49 +09:00
Yuya Nishihara
d5d1dbcd3e
dag_walk: reorder and adjust signature of neighbors_fn for consistency
2023-06-04 11:47:49 +09:00
Yuya Nishihara
a28e672633
dag_walk: unbox topo_order_reverse() callback
2023-06-04 11:47:49 +09:00
Yuya Nishihara
3ba544414c
dag_walk: unbox bfs() callback, use iter::from_fn() to implement iterator
...
I just wanted to remove syntactic noise from callers. iter::from_fn() helps
to avoid declaring struct with lots of type parameters.
2023-06-04 11:47:49 +09:00
Yuya Nishihara
522308bb9c
dag_walk: simply pass callback function by value
2023-06-04 11:47:49 +09:00
Martin von Zweigbergk
be638d0205
dag_walk: delete unused common_ancestor()
2023-01-29 10:42:11 -08:00
Martin von Zweigbergk
d8feed9be4
copyright: change from "Google LLC" to "The Jujutsu Authors"
...
Let's acknowledge everyone's contributions by replacing "Google LLC"
in the copyright header by "The Jujutsu Authors". If I understand
correctly, it won't have any legal effect, but maybe it still helps
reduce concerns from contributors (though I haven't heard any
concerns).
Google employees can read about Google's policy at
go/releasing/contributions#copyright.
2022-11-28 06:05:45 -10:00
Martin von Zweigbergk
b654a1fe84
cleanup: remove extern crate
declarations
...
`extern crate` is no longer needed since edition 2018.
2022-09-21 22:24:09 -07:00
Martin von Zweigbergk
5893b52fd1
cleanup: use while let Some(...)
instead of checking before popping
2022-05-01 13:45:00 -07:00
Martin von Zweigbergk
99d2ef8883
cleanup: simplify some uses of Option
, mostly by using ?
2022-04-25 13:09:24 -07:00
Martin von Zweigbergk
4c416dd864
cleanup: let Clippy fix a bunch of warnings
2021-06-14 00:27:31 -07:00
Martin von Zweigbergk
b593e552b8
cleanup: remove some Vec<_> annotations, mostly by using collect_vec()
2021-06-09 14:21:57 -07:00
Martin von Zweigbergk
d71c083a7f
cli: use revsets also when looking up by description
2021-04-18 22:45:12 -07:00
Martin von Zweigbergk
53d1757994
dag_walk: remove unused TopoIter
2021-03-18 16:42:30 -07:00
Martin von Zweigbergk
30cd94f842
dag_walk: rename unreachable() to heads() to match name we use in index module
2021-03-16 23:54:51 -07:00
Martin von Zweigbergk
4b8484e561
rustfmt: configure to group imports
2021-03-14 10:46:25 -07:00
Martin von Zweigbergk
713d32d803
index: keep up to date within transaction
...
With tons of groundwork done, wee can now finally keep the index up to
date within a transaction! That means that we can start relying on the
index to always be valid, so we can use it e.g. for finding common
ancestors within a transaction. That should help speed up `jj evolve`
immensely on large repos.
We still don't write the updated index to disk when the transaction
closes. That will come later.
2021-02-14 00:58:11 -08:00
Martin von Zweigbergk
88e7f4a30c
tests: start using the maplit crate
2020-12-23 17:32:31 -08:00
Martin von Zweigbergk
6b1427cb46
import commit 0f15be02bf4012c116636913562691a0aaa7aed2 from my hg repo
2020-12-12 00:23:38 -08:00