jj/lib/src
Austin Seipp e15429ba91 cli: make git support optional
There are some experiments to try and compile `jj` to WebAssembly, so that we
might be able to do things like interactive web tutorials. One step for that
is making `git` support in `jj-cli` optional, because we can stub it out for
something more appropriate and it's otherwise a lot of porting annoyance for
both gitoxide and libgit2.

(On top of that, it might be a useful build configuration for other experiments
of mine where removing the need for the large libgit2 depchain is useful.)

As part of this, we need to mark `jj-lib` as having `default-features = false`
in the workspace dependency configuration; otherwise, the default behavior
for Cargo is to compile with all its default features, i.e. with git support
enabled, ignoring the `jj-cli` features clauses.

Other than that, it is fairly straightforward junk; it largely just sprinkles
some `#[cfg]` around liberally in order to make things work. It also adjusts the
CI pipeline so this is tested there, too, so we can progressively clean it up.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2025-01-08 22:02:21 +00:00
..
config config: load system host/user name by CLI and insert as env-base layer 2025-01-04 17:54:28 +09:00
default_index docs/cli: update URLs to from martinvonz user to jj-vcs org 2024-12-17 12:44:44 -08:00
lock lock: propagate error from lock(), remove panic from unlock path 2024-11-14 22:37:54 +09:00
protos local_working_copy: store materialized conflict marker length 2024-12-21 11:36:30 -06:00
absorb.rs repo: remove &UserSettings argument from new/rewrite_commit(), use self.settings 2024-12-31 10:51:57 +09:00
annotate.rs conflicts: add "ui.conflict-marker-style" config 2024-11-23 08:28:47 -06:00
backend.rs object_id: implement Display on ObjectId types 2024-10-16 09:12:16 +09:00
commit.rs commit_builder: add is_empty(), is_discardable(), and .abandon() 2024-12-21 09:19:54 +09:00
commit_builder.rs commit_builder: add is_empty(), is_discardable(), and .abandon() 2024-12-21 09:19:54 +09:00
config.rs Back out "config: merge and print inline tables as values" 2025-01-08 05:24:55 +00:00
config_resolver.rs Back out "config: merge and print inline tables as values" 2025-01-08 05:24:55 +00:00
conflicts.rs local_working_copy: store materialized conflict marker length 2024-12-21 11:36:30 -06:00
content_hash.rs
copies.rs
dag_walk.rs lib: fix various typos 2024-12-21 02:46:24 +08:00
default_submodule_store.rs
diff.rs diff: optimize allocation of histogram entries for unique words 2024-11-22 08:20:55 +09:00
dsl_util.rs revset: extract helper that parses function call 2024-10-21 08:47:08 +09:00
extensions_map.rs
file_util.rs
files.rs style: remove unneeded lifetimes from trait implementations 2024-10-17 13:35:06 +02:00
fileset.pest
fileset.rs fileset: remove Eq + PartialEq from FilesetExpression/Pattern 2024-10-15 06:58:44 +09:00
fileset_parser.rs
fmt_util.rs
fsmonitor.rs fsmonitor: move default settings to config/misc.toml 2024-12-25 10:44:37 +09:00
git.rs cli: make git support optional 2025-01-08 22:02:21 +00:00
git_backend.rs config: extract jj-lib's default values to embedded TOML file 2024-12-25 10:44:37 +09:00
gitignore.rs jj-lib: fix typo in tests 2024-12-19 11:35:44 -08:00
gpg_signing.rs signing: move default backend settings to config/misc.toml 2024-12-25 10:44:37 +09:00
graph.rs graph: inline ReverseGraphIterator to callers 2024-12-23 09:28:03 +09:00
hex_util.rs hex_util: simplify conversion from bytes to reverse hex string 2024-10-16 09:12:16 +09:00
id_prefix.rs revset: reorganize expression resolution/evaluation methods 2024-11-08 10:34:02 +09:00
index.rs
lib.rs cli: make git support optional 2025-01-08 22:02:21 +00:00
local_backend.rs lib: remove use of zstd 2025-01-08 22:02:21 +00:00
local_working_copy.rs local_working_copy: on snapshot, ignore submodule in ignored directories 2025-01-08 09:39:59 +09:00
matchers.rs nightly clippy fixes 2024-11-18 18:49:05 -08:00
merge.rs store: make get_tree() functions take owned repo path 2024-11-27 18:53:28 -08:00
merged_tree.rs merged_tree: slightly adjust doc comment of inner trees() helpers 2024-11-30 10:20:43 +09:00
object_id.rs object_id: implement Display on ObjectId types 2024-10-16 09:12:16 +09:00
op_heads_store.rs lock: propagate error from lock(), remove panic from unlock path 2024-11-14 22:37:54 +09:00
op_store.rs object_id: implement Display on ObjectId types 2024-10-16 09:12:16 +09:00
op_walk.rs op_heads_store: allow methods to return errors 2024-11-13 23:05:24 -08:00
operation.rs
refs.rs
repo.rs repo: remove &UserSettings argument from new/rewrite_commit(), use self.settings 2024-12-31 10:51:57 +09:00
repo_path.rs tests: work around codespell suggesting dows->does 2024-11-07 13:38:04 +09:00
revset.pest
revset.rs cli: make git support optional 2025-01-08 22:02:21 +00:00
revset_parser.rs revset: extract helper that parses function call 2024-10-21 08:47:08 +09:00
rewrite.rs rewrite: back out 9d4a973 2025-01-07 09:08:46 -08:00
secret_backend.rs
settings.rs cli: resolve settings for newly initialized/cloned workspace 2025-01-06 10:39:48 +09:00
signing.rs sign: Add templater methods to show signature info 2025-01-04 13:24:08 +01:00
simple_op_heads_store.rs lock: propagate error from lock(), remove panic from unlock path 2024-11-14 22:37:54 +09:00
simple_op_store.rs cli: make git support optional 2025-01-08 22:02:21 +00:00
ssh_signing.rs signing: move default backend settings to config/misc.toml 2024-12-25 10:44:37 +09:00
stacked_table.rs stacked_table: add context to error type, propagate lock error 2024-11-14 22:37:54 +09:00
store.rs signing: cap number of cached verification results 2025-01-02 15:06:52 +09:00
str_util.rs
submodule_store.rs
test_signing_backend.rs sign: Add templater methods to show signature info 2025-01-04 13:24:08 +01:00
time_util.rs docs: fix cargo doc warnings 2024-12-31 17:11:28 -06:00
transaction.rs settings: cache commit and operation parameters by UserSettings 2024-12-23 22:57:57 +09:00
tree.rs store: make get_tree() functions take owned repo path 2024-11-27 18:53:28 -08:00
tree_builder.rs store: make get_tree() functions take owned repo path 2024-11-27 18:53:28 -08:00
union_find.rs docs: fix cargo doc warnings 2024-12-31 17:11:28 -06:00
view.rs revset: allow tags() to take a pattern for an argument 2024-11-20 00:47:23 +00:00
working_copy.rs working_copy: added UntrackedReason::FileNotAutoTracked for files not tracked because of snapshot.auto-track 2025-01-05 17:43:59 +01:00
workspace.rs workspace: add settings() getter 2025-01-06 10:39:48 +09:00