repo stringlengths 6 65 | file_url stringlengths 81 311 | file_path stringlengths 6 227 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:31:58 2026-01-04 20:25:31 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/xtask/src/bump.rs | crates/xtask/src/bump.rs | use std::{cmp::Ordering, path::Path};
use anyhow::{anyhow, Context, Result};
use indoc::indoc;
use semver::{Prerelease, Version};
use crate::{create_commit, BumpVersion};
pub fn get_latest_tag() -> Result<String> {
let output = std::process::Command::new("git")
.args(["tag", "-l"])
.output()?;
... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/xtask/src/generate.rs | crates/xtask/src/generate.rs | use std::{collections::BTreeSet, ffi::OsStr, fs, path::Path, process::Command, str::FromStr};
use anyhow::{Context, Result};
use bindgen::RustTarget;
use crate::{bail_on_err, GenerateFixtures};
const HEADER_PATH: &str = "lib/include/tree_sitter/api.h";
pub fn run_fixtures(args: &GenerateFixtures) -> Result<()> {
... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/xtask/src/upgrade_wasmtime.rs | crates/xtask/src/upgrade_wasmtime.rs | use std::process::Command;
use anyhow::{Context, Result};
use semver::Version;
use crate::{create_commit, UpgradeWasmtime};
const WASMTIME_RELEASE_URL: &str = "https://github.com/bytecodealliance/wasmtime/releases/download";
fn update_cargo(version: &Version) -> Result<()> {
let file = std::fs::read_to_string("... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/xtask/src/clippy.rs | crates/xtask/src/clippy.rs | use std::process::Command;
use anyhow::Result;
use crate::{bail_on_err, Clippy};
pub fn run(args: &Clippy) -> Result<()> {
let mut clippy_command = Command::new("cargo");
clippy_command.arg("clippy");
if let Some(package) = args.package.as_ref() {
clippy_command.args(["--package", package]);
... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/config/src/tree_sitter_config.rs | crates/config/src/tree_sitter_config.rs | #![cfg_attr(not(any(test, doctest)), doc = include_str!("../README.md"))]
use std::{
env, fs,
path::{Path, PathBuf},
};
use etcetera::BaseStrategy as _;
use log::warn;
use serde::{Deserialize, Serialize};
use serde_json::Value;
use thiserror::Error;
pub type ConfigResult<T> = Result<T, ConfigError>;
#[deriv... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/build.rs | crates/cli/build.rs | use std::{
env,
path::{Path, PathBuf},
process::Command,
time::SystemTime,
};
fn main() {
if let Some(git_sha) = read_git_sha() {
println!("cargo:rustc-env=BUILD_SHA={git_sha}");
}
println!("cargo:rustc-check-cfg=cfg(sanitizing)");
println!("cargo:rustc-check-cfg=cfg(TREE_SITTE... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/test.rs | crates/cli/src/test.rs | use std::{
collections::BTreeMap,
ffi::OsStr,
fmt::Display as _,
fs,
io::{self, Write},
path::{Path, PathBuf},
str,
sync::LazyLock,
time::Duration,
};
use anstyle::AnsiColor;
use anyhow::{anyhow, Context, Result};
use clap::ValueEnum;
use indoc::indoc;
use regex::{
bytes::{Regex... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | true |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/highlight.rs | crates/cli/src/highlight.rs | use std::{
collections::{BTreeMap, HashSet},
fmt::Write,
fs,
io::{self, Write as _},
path::{self, Path, PathBuf},
str,
sync::{atomic::AtomicUsize, Arc},
time::Instant,
};
use ansi_colours::{ansi256_from_rgb, rgb_from_ansi256};
use anstyle::{Ansi256Color, AnsiColor, Color, Effects, RgbCo... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/version.rs | crates/cli/src/version.rs | use std::{fs, path::PathBuf, process::Command};
use clap::ValueEnum;
use log::{info, warn};
use regex::Regex;
use semver::Version as SemverVersion;
use std::cmp::Ordering;
use tree_sitter_loader::TreeSitterJSON;
#[derive(Clone, Copy, Default, ValueEnum)]
pub enum BumpLevel {
#[default]
Patch,
Minor,
M... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/parse.rs | crates/cli/src/parse.rs | use std::{
fmt, fs,
io::{self, Write},
ops::ControlFlow,
path::{Path, PathBuf},
sync::atomic::{AtomicUsize, Ordering},
time::{Duration, Instant},
};
use anstyle::{AnsiColor, Color, RgbColor};
use anyhow::{anyhow, Context, Result};
use clap::ValueEnum;
use log::info;
use schemars::JsonSchema;
us... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | true |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/tests.rs | crates/cli/src/tests.rs | mod async_boundary_test;
mod corpus_test;
mod detect_language;
mod helpers;
mod highlight_test;
mod language_test;
mod node_test;
mod parser_test;
mod pathological_test;
mod query_test;
mod tags_test;
mod test_highlight_test;
mod test_tags_test;
mod text_provider_test;
mod tree_test;
#[cfg(feature = "wasm")]
mod wasm_... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/tree_sitter_cli.rs | crates/cli/src/tree_sitter_cli.rs | #![cfg_attr(not(any(test, doctest)), doc = include_str!("../README.md"))]
pub mod fuzz;
pub mod highlight;
pub mod init;
pub mod input;
pub mod logger;
pub mod parse;
pub mod playground;
pub mod query;
pub mod query_testing;
pub mod tags;
pub mod test;
pub mod test_highlight;
pub mod test_tags;
pub mod util;
pub mod v... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/fuzz.rs | crates/cli/src/fuzz.rs | use std::{
collections::HashMap,
env, fs,
path::{Path, PathBuf},
sync::LazyLock,
};
use log::{error, info};
use rand::Rng;
use regex::Regex;
use tree_sitter::{Language, Parser};
pub mod allocations;
pub mod corpus_test;
pub mod edits;
pub mod random;
pub mod scope_sequence;
use crate::{
fuzz::{
... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/logger.rs | crates/cli/src/logger.rs | use std::io::Write;
use anstyle::{AnsiColor, Color, Style};
use log::{Level, LevelFilter, Log, Metadata, Record};
pub fn paint(color: Option<impl Into<Color>>, text: &str) -> String {
let style = Style::new().fg_color(color.map(Into::into));
format!("{style}{text}{style:#}")
}
struct Logger;
impl Log for Lo... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/test_tags.rs | crates/cli/src/test_tags.rs | use std::{fs, path::Path};
use anyhow::{anyhow, Result};
use tree_sitter_loader::{Config, Loader};
use tree_sitter_tags::{TagsConfiguration, TagsContext};
use crate::{
query_testing::{parse_position_comments, to_utf8_point, Assertion, Utf8Point},
test::{TestInfo, TestOutcome, TestResult, TestSummary},
uti... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/playground.rs | crates/cli/src/playground.rs | use std::{
borrow::Cow,
env, fs,
net::TcpListener,
path::{Path, PathBuf},
str::{self, FromStr as _},
};
use anyhow::{anyhow, Context, Result};
use log::{error, info};
use tiny_http::{Header, Response, Server};
use super::wasm;
macro_rules! optional_resource {
($name:tt, $path:tt) => {
... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/util.rs | crates/cli/src/util.rs | use std::{
path::{Path, PathBuf},
process::{Child, ChildStdin, Command, Stdio},
sync::{
atomic::{AtomicUsize, Ordering},
Arc,
},
};
use anyhow::{anyhow, Context, Result};
use indoc::indoc;
use log::error;
use tree_sitter::{Parser, Tree};
use tree_sitter_config::Config;
use tree_sitter_l... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/init.rs | crates/cli/src/init.rs | use std::{
fs,
path::{Path, PathBuf},
str::{self, FromStr},
};
use anyhow::{anyhow, Context, Result};
use crc32fast::hash as crc32;
use heck::{ToKebabCase, ToShoutySnakeCase, ToSnakeCase, ToUpperCamelCase};
use indoc::{formatdoc, indoc};
use log::info;
use rand::{thread_rng, Rng};
use semver::Version;
use ... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | true |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/tags.rs | crates/cli/src/tags.rs | use std::{
fs,
io::{self, Write},
path::Path,
str,
sync::{atomic::AtomicUsize, Arc},
time::Instant,
};
use anyhow::Result;
use tree_sitter_tags::{TagsConfiguration, TagsContext};
pub struct TagsOptions {
pub scope: Option<String>,
pub quiet: bool,
pub print_time: bool,
pub canc... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/query.rs | crates/cli/src/query.rs | use std::{
fs,
io::{self, Write},
ops::Range,
path::Path,
time::Instant,
};
use anyhow::{Context, Result};
use log::warn;
use streaming_iterator::StreamingIterator;
use tree_sitter::{Language, Parser, Point, Query, QueryCursor};
use crate::{
query_testing::{self, to_utf8_point},
test::{Tes... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/main.rs | crates/cli/src/main.rs | use std::{
collections::HashSet,
env, fs,
path::{Path, PathBuf},
};
use anstyle::{AnsiColor, Color, Style};
use anyhow::{anyhow, Context, Result};
use clap::{crate_authors, Args, Command, FromArgMatches as _, Subcommand, ValueEnum};
use clap_complete::generate;
use dialoguer::{theme::ColorfulTheme, Confirm... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | true |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/wasm.rs | crates/cli/src/wasm.rs | use std::{
fs,
path::{Path, PathBuf},
};
use anyhow::{anyhow, Context, Result};
use tree_sitter::wasm_stdlib_symbols;
use tree_sitter_generate::{load_grammar_file, parse_grammar::GrammarJSON};
use tree_sitter_loader::Loader;
use wasmparser::Parser;
pub fn load_language_wasm_file(language_dir: &Path) -> Result... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/query_testing.rs | crates/cli/src/query_testing.rs | use std::{fs, path::Path, sync::LazyLock};
use anyhow::{anyhow, Result};
use bstr::{BStr, ByteSlice};
use regex::Regex;
use tree_sitter::{Language, Parser, Point};
static CAPTURE_NAME_REGEX: LazyLock<Regex> = LazyLock::new(|| Regex::new("[\\w_\\-.]+").unwrap());
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, H... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/test_highlight.rs | crates/cli/src/test_highlight.rs | use std::{fs, path::Path};
use anyhow::{anyhow, Result};
use tree_sitter::Point;
use tree_sitter_highlight::{Highlight, HighlightConfiguration, HighlightEvent, Highlighter};
use tree_sitter_loader::{Config, Loader};
use crate::{
query_testing::{parse_position_comments, to_utf8_point, Assertion, Utf8Point},
te... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/input.rs | crates/cli/src/input.rs | use std::{
fs,
io::{Read, Write},
path::{Path, PathBuf},
sync::{
atomic::{AtomicUsize, Ordering},
mpsc, Arc,
},
};
use anyhow::{anyhow, bail, Context, Result};
use glob::glob;
use crate::test::{parse_tests, TestEntry};
pub enum CliInput {
Paths(Vec<PathBuf>),
Test {
... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/tests/corpus_test.rs | crates/cli/src/tests/corpus_test.rs | use std::{collections::HashMap, env, fs};
use anyhow::Context;
use tree_sitter::Parser;
use tree_sitter_proc_macro::test_with_seed;
use crate::{
fuzz::{
corpus_test::{
check_changed_ranges, check_consistent_sizes, get_parser, set_included_ranges,
},
edits::{get_random_edit, inv... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/tests/node_test.rs | crates/cli/src/tests/node_test.rs | use tree_sitter::{InputEdit, Node, Parser, Point, Tree};
use tree_sitter_generate::load_grammar_file;
use super::{
get_random_edit,
helpers::fixtures::{fixtures_dir, get_language, get_test_language},
Rand,
};
use crate::{
parse::perform_edit,
tests::{generate_parser, helpers::fixtures::get_test_fix... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | true |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/tests/query_test.rs | crates/cli/src/tests/query_test.rs | use std::{env, fmt::Write, ops::ControlFlow, sync::LazyLock};
use indoc::indoc;
use rand::{prelude::StdRng, SeedableRng};
use streaming_iterator::StreamingIterator;
use tree_sitter::{
CaptureQuantifier, InputEdit, Language, Node, Parser, Point, Query, QueryCursor,
QueryCursorOptions, QueryError, QueryErrorKind... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | true |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/tests/pathological_test.rs | crates/cli/src/tests/pathological_test.rs | use tree_sitter::Parser;
use super::helpers::{allocations, fixtures::get_language};
#[test]
fn test_pathological_example_1() {
let language = "cpp";
let source = r#"*ss<s"ss<sqXqss<s._<s<sq<(qqX<sqss<s.ss<sqsssq<(qss<qssqXqss<s._<s<sq<(qqX<sqss<s.ss<sqsssq<(qss<sqss<sqss<s._<s<sq>(qqX<sqss<s.ss<sqsssq<(qss<sq... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/tests/highlight_test.rs | crates/cli/src/tests/highlight_test.rs | use std::{
ffi::CString,
fs,
os::raw::c_char,
ptr, slice, str,
sync::{
atomic::{AtomicUsize, Ordering},
LazyLock,
},
};
use tree_sitter_highlight::{
c, Error, Highlight, HighlightConfiguration, HighlightEvent, Highlighter, HtmlRenderer,
};
use super::helpers::fixtures::{get... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/tests/helpers.rs | crates/cli/src/tests/helpers.rs | pub use crate::fuzz::allocations;
pub mod edits;
pub(super) mod fixtures;
pub(super) mod query_helpers;
| rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/tests/parser_test.rs | crates/cli/src/tests/parser_test.rs | use std::{
ops::ControlFlow,
sync::{
atomic::{AtomicUsize, Ordering},
mpsc,
},
thread,
time::{self, Duration},
};
use tree_sitter::{
Decode, IncludedRangesError, InputEdit, LogType, ParseOptions, ParseState, Parser, Point, Range,
};
use tree_sitter_generate::load_grammar_file;
u... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | true |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/tests/tree_test.rs | crates/cli/src/tests/tree_test.rs | use std::str;
use tree_sitter::{InputEdit, Parser, Point, Range, Tree};
use super::helpers::fixtures::get_language;
use crate::{
fuzz::edits::Edit,
parse::perform_edit,
tests::{helpers::fixtures::get_test_fixture_language, invert_edit},
};
#[test]
fn test_tree_edit() {
let mut parser = Parser::new();... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/tests/tags_test.rs | crates/cli/src/tests/tags_test.rs | use std::{
ffi::{CStr, CString},
fs, ptr, slice, str,
sync::atomic::{AtomicUsize, Ordering},
};
use tree_sitter::Point;
use tree_sitter_tags::{c_lib as c, Error, TagsConfiguration, TagsContext};
use super::helpers::{
allocations,
fixtures::{get_language, get_language_queries_path},
};
const PYTHO... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/tests/detect_language.rs | crates/cli/src/tests/detect_language.rs | use std::{fs, path::Path};
use tree_sitter_loader::Loader;
use crate::tests::helpers::fixtures::scratch_dir;
#[test]
fn detect_language_by_first_line_regex() {
let strace_dir = tree_sitter_dir(
r#"{
"grammars": [
{
"name": "strace",
"path": ".",
"scope": "source.strace",
"fi... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/tests/test_tags_test.rs | crates/cli/src/tests/test_tags_test.rs | use tree_sitter::Parser;
use tree_sitter_tags::TagsContext;
use super::helpers::fixtures::{get_language, get_tags_config};
use crate::{
query_testing::{parse_position_comments, Assertion, Utf8Point},
test_tags::get_tag_positions,
};
#[test]
fn test_tags_test_with_basic_test() {
let language = get_language... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/tests/async_boundary_test.rs | crates/cli/src/tests/async_boundary_test.rs | use std::{
future::Future,
pin::Pin,
ptr,
task::{Context, Poll, RawWaker, RawWakerVTable, Waker},
};
use tree_sitter::Parser;
use super::helpers::fixtures::get_language;
#[test]
fn test_node_across_async_boundaries() {
let mut parser = Parser::new();
let language = get_language("bash");
p... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/tests/text_provider_test.rs | crates/cli/src/tests/text_provider_test.rs | use std::{iter, sync::Arc};
use streaming_iterator::StreamingIterator;
use tree_sitter::{Language, Node, Parser, Point, Query, QueryCursor, TextProvider, Tree};
use crate::tests::helpers::fixtures::get_language;
fn parse_text(text: impl AsRef<[u8]>) -> (Tree, Language) {
let language = get_language("c");
let... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/tests/wasm_language_test.rs | crates/cli/src/tests/wasm_language_test.rs | use std::fs;
use streaming_iterator::StreamingIterator;
use tree_sitter::{Parser, Query, QueryCursor, WasmError, WasmErrorKind, WasmStore};
use crate::tests::helpers::{
allocations,
fixtures::{get_test_fixture_language_wasm, ENGINE, WASM_DIR},
};
#[test]
fn test_wasm_stdlib_symbols() {
let symbols = tree... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/tests/test_highlight_test.rs | crates/cli/src/tests/test_highlight_test.rs | use tree_sitter::Parser;
use tree_sitter_highlight::{Highlight, Highlighter};
use super::helpers::fixtures::{get_highlight_config, get_language, test_loader};
use crate::{
query_testing::{parse_position_comments, Assertion, Utf8Point},
test_highlight::get_highlight_positions,
};
#[test]
fn test_highlight_test... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/tests/language_test.rs | crates/cli/src/tests/language_test.rs | use tree_sitter::{self, Parser};
use super::helpers::fixtures::get_language;
#[test]
fn test_lookahead_iterator() {
let mut parser = Parser::new();
let language = get_language("rust");
parser.set_language(&language).unwrap();
let tree = parser.parse("struct Stuff {}", None).unwrap();
let mut cur... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/tests/helpers/query_helpers.rs | crates/cli/src/tests/helpers/query_helpers.rs | use std::{cmp::Ordering, fmt::Write, ops::Range};
use rand::prelude::Rng;
use streaming_iterator::{IntoStreamingIterator, StreamingIterator};
use tree_sitter::{
Language, Node, Parser, Point, Query, QueryCapture, QueryCursor, QueryMatch, Tree, TreeCursor,
};
#[derive(Debug)]
pub struct Pattern {
kind: Option<... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/tests/helpers/edits.rs | crates/cli/src/tests/helpers/edits.rs | use std::{ops::Range, str};
#[derive(Debug)]
pub struct ReadRecorder<'a> {
content: &'a [u8],
indices_read: Vec<usize>,
}
impl<'a> ReadRecorder<'a> {
#[must_use]
pub const fn new(content: &'a [u8]) -> Self {
Self {
content,
indices_read: Vec::new(),
}
}
... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/tests/helpers/fixtures.rs | crates/cli/src/tests/helpers/fixtures.rs | use std::{
env, fs,
path::{Path, PathBuf},
sync::LazyLock,
};
use anyhow::Context;
use tree_sitter::Language;
use tree_sitter_generate::{load_grammar_file, ALLOC_HEADER, ARRAY_HEADER};
use tree_sitter_highlight::HighlightConfiguration;
use tree_sitter_loader::{CompileConfig, Loader};
use tree_sitter_tags::... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/tests/helpers/dirs.rs | crates/cli/src/tests/helpers/dirs.rs | pub static ROOT_DIR: LazyLock<PathBuf> = LazyLock::new(|| {
PathBuf::from(env!("CARGO_MANIFEST_DIR"))
.parent()
.unwrap()
.parent()
.unwrap()
.to_owned()
});
pub static FIXTURES_DIR: LazyLock<PathBuf> =
LazyLock::new(|| ROOT_DIR.join("test").join("fixtures"));
pub stati... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/tests/proc_macro/src/lib.rs | crates/cli/src/tests/proc_macro/src/lib.rs | use proc_macro::TokenStream;
use proc_macro2::Span;
use quote::quote;
use syn::{
parse::{Parse, ParseStream},
parse_macro_input, Error, Expr, Ident, ItemFn, LitInt, Token,
};
#[proc_macro_attribute]
pub fn retry(args: TokenStream, input: TokenStream) -> TokenStream {
let count = parse_macro_input!(args as ... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/fuzz/corpus_test.rs | crates/cli/src/fuzz/corpus_test.rs | use tree_sitter::{LogType, Node, Parser, Point, Range, Tree};
use super::{scope_sequence::ScopeSequence, LOG_ENABLED, LOG_GRAPH_ENABLED};
use crate::util;
pub fn check_consistent_sizes(tree: &Tree, input: &[u8]) {
fn check(node: Node, line_offsets: &[usize]) {
let start_byte = node.start_byte();
l... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/fuzz/random.rs | crates/cli/src/fuzz/random.rs | use rand::{
distributions::Alphanumeric,
prelude::{Rng, SeedableRng, StdRng},
};
const OPERATORS: &[char] = &[
'+', '-', '<', '>', '(', ')', '*', '/', '&', '|', '!', ',', '.', '%',
];
pub struct Rand(StdRng);
impl Rand {
#[must_use]
pub fn new(seed: usize) -> Self {
Self(StdRng::seed_from... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/fuzz/scope_sequence.rs | crates/cli/src/fuzz/scope_sequence.rs | use tree_sitter::{Point, Range, Tree};
#[derive(Debug)]
pub struct ScopeSequence(Vec<ScopeStack>);
type ScopeStack = Vec<&'static str>;
impl ScopeSequence {
#[must_use]
pub fn new(tree: &Tree) -> Self {
let mut result = Self(Vec::new());
let mut scope_stack = Vec::new();
let mut curs... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/fuzz/edits.rs | crates/cli/src/fuzz/edits.rs | use super::random::Rand;
#[derive(Debug)]
pub struct Edit {
pub position: usize,
pub deleted_length: usize,
pub inserted_text: Vec<u8>,
}
#[must_use]
pub fn invert_edit(input: &[u8], edit: &Edit) -> Edit {
let position = edit.position;
let removed_content = &input[position..(position + edit.delete... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/fuzz/allocations.rs | crates/cli/src/fuzz/allocations.rs | use std::{
collections::HashMap,
os::raw::c_void,
sync::{
atomic::{AtomicBool, AtomicUsize, Ordering::SeqCst},
Mutex,
},
};
#[ctor::ctor]
unsafe fn initialize_allocation_recording() {
tree_sitter::set_allocator(
Some(ts_record_malloc),
Some(ts_record_calloc),
... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/templates/lib.rs | crates/cli/src/templates/lib.rs | //! This crate provides TITLE_PARSER_NAME language support for the [tree-sitter] parsing library.
//!
//! Typically, you will use the [`LANGUAGE`] constant to add this language to a
//! tree-sitter [`Parser`], and then use the parser to parse some code:
//!
//! ```
//! let code = r#"
//! "#;
//! let mut parser = tree_s... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/src/templates/build.rs | crates/cli/src/templates/build.rs | fn main() {
let src_dir = std::path::Path::new("src");
let mut c_config = cc::Build::new();
c_config.std("c11").include(src_dir);
#[cfg(target_env = "msvc")]
c_config.flag("-utf-8");
if std::env::var("TARGET").unwrap() == "wasm32-unknown-unknown" {
let Ok(wasm_headers) = std::env::var... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/cli/benches/benchmark.rs | crates/cli/benches/benchmark.rs | use std::{
collections::BTreeMap,
env, fs,
path::{Path, PathBuf},
str,
sync::LazyLock,
time::Instant,
};
use anyhow::Context;
use log::info;
use tree_sitter::{Language, Parser, Query};
use tree_sitter_loader::{CompileConfig, Loader};
include!("../src/tests/helpers/dirs.rs");
static LANGUAGE_F... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/highlight/src/highlight.rs | crates/highlight/src/highlight.rs | #![cfg_attr(not(any(test, doctest)), doc = include_str!("../README.md"))]
pub mod c_lib;
use core::slice;
use std::{
collections::HashSet,
iter,
marker::PhantomData,
mem::{self, MaybeUninit},
ops::{self, ControlFlow},
str,
sync::{
atomic::{AtomicUsize, Ordering},
LazyLock,
... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | true |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/highlight/src/c_lib.rs | crates/highlight/src/c_lib.rs | use std::{
collections::HashMap, ffi::CStr, fmt, os::raw::c_char, process::abort, slice, str,
sync::atomic::AtomicUsize,
};
use regex::Regex;
use tree_sitter::Language;
use super::{Error, Highlight, HighlightConfiguration, Highlighter, HtmlRenderer};
pub struct TSHighlighter {
pub languages: HashMap<Stri... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/language/build.rs | crates/language/build.rs | fn main() {
if std::env::var("TARGET")
.unwrap_or_default()
.starts_with("wasm32-unknown")
{
let manifest_dir = std::env::var("CARGO_MANIFEST_DIR").unwrap();
let wasm_headers = std::path::Path::new(&manifest_dir).join("wasm/include");
let wasm_src = std::path::Path::new(&... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/crates/language/src/language.rs | crates/language/src/language.rs | #![no_std]
/// `LanguageFn` wraps a C function that returns a pointer to a tree-sitter grammar.
#[repr(transparent)]
#[derive(Clone, Copy)]
pub struct LanguageFn(unsafe extern "C" fn() -> *const ());
impl LanguageFn {
/// Creates a [`LanguageFn`].
///
/// # Safety
///
/// Only call this with langua... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/lib/binding_rust/bindings.rs | lib/binding_rust/bindings.rs | /* automatically generated by rust-bindgen 0.72.1 */
pub const TREE_SITTER_LANGUAGE_VERSION: u32 = 15;
pub const TREE_SITTER_MIN_COMPATIBLE_LANGUAGE_VERSION: u32 = 13;
pub type TSStateId = u16;
pub type TSSymbol = u16;
pub type TSFieldId = u16;
#[repr(C)]
#[derive(Debug)]
pub struct TSLanguage {
_unused: [u8; 0],
... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | true |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/lib/binding_rust/lib.rs | lib/binding_rust/lib.rs | #![cfg_attr(not(any(test, doctest)), doc = include_str!("./README.md"))]
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(docsrs, feature(doc_cfg))]
pub mod ffi;
mod util;
#[cfg(not(feature = "std"))]
extern crate alloc;
#[cfg(not(feature = "std"))]
use alloc::{boxed::Box, format, string::String, string::ToStri... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | true |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/lib/binding_rust/wasm_language.rs | lib/binding_rust/wasm_language.rs | use std::{
error,
ffi::{CStr, CString},
fmt,
mem::{self, MaybeUninit},
os::raw::c_char,
};
pub use wasmtime_c_api::wasmtime;
use crate::{ffi, Language, LanguageError, Parser, FREE_FN};
// Force Cargo to include wasmtime-c-api as a dependency of this crate,
// even though it is only used by the C ... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/lib/binding_rust/build.rs | lib/binding_rust/build.rs | use std::{env, fs, path::PathBuf};
fn main() {
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
let target = env::var("TARGET").unwrap();
#[cfg(feature = "bindgen")]
generate_bindings(&out_dir);
fs::copy(
"src/wasm/stdlib-symbols.txt",
out_dir.join("stdlib-symbols.txt"),... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/lib/binding_rust/util.rs | lib/binding_rust/util.rs | use core::ffi::c_void;
use super::FREE_FN;
/// A raw pointer and a length, exposed as an iterator.
pub struct CBufferIter<T> {
ptr: *mut T,
count: usize,
i: usize,
}
impl<T> CBufferIter<T> {
pub const unsafe fn new(ptr: *mut T, count: usize) -> Self {
Self { ptr, count, i: 0 }
}
}
impl<T... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
tree-sitter/tree-sitter | https://github.com/tree-sitter/tree-sitter/blob/dd60d5cff079dbae8db798ce7272879dbd2ac9e8/lib/binding_rust/ffi.rs | lib/binding_rust/ffi.rs | #![allow(dead_code)]
#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(clippy::missing_const_for_fn)]
#[cfg(feature = "bindgen")]
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
#[cfg(not(feature = "bindgen"))]
include!("./bindings.rs");
#[cfg(unix)]
#[cfg(feature = "std")]
extern "C" {
... | rust | MIT | dd60d5cff079dbae8db798ce7272879dbd2ac9e8 | 2026-01-04T15:38:34.599794Z | false |
jj-vcs/jj | https://github.com/jj-vcs/jj/blob/10efcf35613c9c2076278f1721b5e6826e77c144/lib/gen-protos/src/main.rs | lib/gen-protos/src/main.rs | // Copyright 2022 The Jujutsu Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | rust | Apache-2.0 | 10efcf35613c9c2076278f1721b5e6826e77c144 | 2026-01-04T15:37:48.912814Z | false |
jj-vcs/jj | https://github.com/jj-vcs/jj/blob/10efcf35613c9c2076278f1721b5e6826e77c144/lib/src/merge.rs | lib/src/merge.rs | // Copyright 2023 The Jujutsu Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | rust | Apache-2.0 | 10efcf35613c9c2076278f1721b5e6826e77c144 | 2026-01-04T15:37:48.912814Z | true |
jj-vcs/jj | https://github.com/jj-vcs/jj/blob/10efcf35613c9c2076278f1721b5e6826e77c144/lib/src/config.rs | lib/src/config.rs | // Copyright 2022 The Jujutsu Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | rust | Apache-2.0 | 10efcf35613c9c2076278f1721b5e6826e77c144 | 2026-01-04T15:37:48.912814Z | true |
jj-vcs/jj | https://github.com/jj-vcs/jj/blob/10efcf35613c9c2076278f1721b5e6826e77c144/lib/src/copies.rs | lib/src/copies.rs | // Copyright 2024 The Jujutsu Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | rust | Apache-2.0 | 10efcf35613c9c2076278f1721b5e6826e77c144 | 2026-01-04T15:37:48.912814Z | false |
jj-vcs/jj | https://github.com/jj-vcs/jj/blob/10efcf35613c9c2076278f1721b5e6826e77c144/lib/src/iter_util.rs | lib/src/iter_util.rs | // Copyright 2025 The Jujutsu Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | rust | Apache-2.0 | 10efcf35613c9c2076278f1721b5e6826e77c144 | 2026-01-04T15:37:48.912814Z | false |
jj-vcs/jj | https://github.com/jj-vcs/jj/blob/10efcf35613c9c2076278f1721b5e6826e77c144/lib/src/object_id.rs | lib/src/object_id.rs | // Copyright 2020-2024 The Jujutsu Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | rust | Apache-2.0 | 10efcf35613c9c2076278f1721b5e6826e77c144 | 2026-01-04T15:37:48.912814Z | false |
jj-vcs/jj | https://github.com/jj-vcs/jj/blob/10efcf35613c9c2076278f1721b5e6826e77c144/lib/src/op_heads_store.rs | lib/src/op_heads_store.rs | // Copyright 2021 The Jujutsu Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | rust | Apache-2.0 | 10efcf35613c9c2076278f1721b5e6826e77c144 | 2026-01-04T15:37:48.912814Z | false |
jj-vcs/jj | https://github.com/jj-vcs/jj/blob/10efcf35613c9c2076278f1721b5e6826e77c144/lib/src/gitignore.rs | lib/src/gitignore.rs | // Copyright 2021 The Jujutsu Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | rust | Apache-2.0 | 10efcf35613c9c2076278f1721b5e6826e77c144 | 2026-01-04T15:37:48.912814Z | false |
jj-vcs/jj | https://github.com/jj-vcs/jj/blob/10efcf35613c9c2076278f1721b5e6826e77c144/lib/src/settings.rs | lib/src/settings.rs | // Copyright 2020 The Jujutsu Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | rust | Apache-2.0 | 10efcf35613c9c2076278f1721b5e6826e77c144 | 2026-01-04T15:37:48.912814Z | false |
jj-vcs/jj | https://github.com/jj-vcs/jj/blob/10efcf35613c9c2076278f1721b5e6826e77c144/lib/src/refs.rs | lib/src/refs.rs | // Copyright 2021 The Jujutsu Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | rust | Apache-2.0 | 10efcf35613c9c2076278f1721b5e6826e77c144 | 2026-01-04T15:37:48.912814Z | false |
jj-vcs/jj | https://github.com/jj-vcs/jj/blob/10efcf35613c9c2076278f1721b5e6826e77c144/lib/src/workspace.rs | lib/src/workspace.rs | // Copyright 2021 The Jujutsu Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | rust | Apache-2.0 | 10efcf35613c9c2076278f1721b5e6826e77c144 | 2026-01-04T15:37:48.912814Z | false |
jj-vcs/jj | https://github.com/jj-vcs/jj/blob/10efcf35613c9c2076278f1721b5e6826e77c144/lib/src/git_subprocess.rs | lib/src/git_subprocess.rs | // Copyright 2025 The Jujutsu Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | rust | Apache-2.0 | 10efcf35613c9c2076278f1721b5e6826e77c144 | 2026-01-04T15:37:48.912814Z | true |
jj-vcs/jj | https://github.com/jj-vcs/jj/blob/10efcf35613c9c2076278f1721b5e6826e77c144/lib/src/repo_path.rs | lib/src/repo_path.rs | // Copyright 2020 The Jujutsu Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | rust | Apache-2.0 | 10efcf35613c9c2076278f1721b5e6826e77c144 | 2026-01-04T15:37:48.912814Z | true |
jj-vcs/jj | https://github.com/jj-vcs/jj/blob/10efcf35613c9c2076278f1721b5e6826e77c144/lib/src/union_find.rs | lib/src/union_find.rs | // Copyright 2024 The Jujutsu Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | rust | Apache-2.0 | 10efcf35613c9c2076278f1721b5e6826e77c144 | 2026-01-04T15:37:48.912814Z | false |
jj-vcs/jj | https://github.com/jj-vcs/jj/blob/10efcf35613c9c2076278f1721b5e6826e77c144/lib/src/extensions_map.rs | lib/src/extensions_map.rs | // Copyright 2024 The Jujutsu Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | rust | Apache-2.0 | 10efcf35613c9c2076278f1721b5e6826e77c144 | 2026-01-04T15:37:48.912814Z | false |
jj-vcs/jj | https://github.com/jj-vcs/jj/blob/10efcf35613c9c2076278f1721b5e6826e77c144/lib/src/dag_walk.rs | lib/src/dag_walk.rs | // Copyright 2020 The Jujutsu Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | rust | Apache-2.0 | 10efcf35613c9c2076278f1721b5e6826e77c144 | 2026-01-04T15:37:48.912814Z | true |
jj-vcs/jj | https://github.com/jj-vcs/jj/blob/10efcf35613c9c2076278f1721b5e6826e77c144/lib/src/lib.rs | lib/src/lib.rs | // Copyright 2020 The Jujutsu Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | rust | Apache-2.0 | 10efcf35613c9c2076278f1721b5e6826e77c144 | 2026-01-04T15:37:48.912814Z | false |
jj-vcs/jj | https://github.com/jj-vcs/jj/blob/10efcf35613c9c2076278f1721b5e6826e77c144/lib/src/index.rs | lib/src/index.rs | // Copyright 2020 The Jujutsu Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | rust | Apache-2.0 | 10efcf35613c9c2076278f1721b5e6826e77c144 | 2026-01-04T15:37:48.912814Z | false |
jj-vcs/jj | https://github.com/jj-vcs/jj/blob/10efcf35613c9c2076278f1721b5e6826e77c144/lib/src/store.rs | lib/src/store.rs | // Copyright 2020 The Jujutsu Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | rust | Apache-2.0 | 10efcf35613c9c2076278f1721b5e6826e77c144 | 2026-01-04T15:37:48.912814Z | false |
jj-vcs/jj | https://github.com/jj-vcs/jj/blob/10efcf35613c9c2076278f1721b5e6826e77c144/lib/src/commit_builder.rs | lib/src/commit_builder.rs | // Copyright 2020 The Jujutsu Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | rust | Apache-2.0 | 10efcf35613c9c2076278f1721b5e6826e77c144 | 2026-01-04T15:37:48.912814Z | false |
jj-vcs/jj | https://github.com/jj-vcs/jj/blob/10efcf35613c9c2076278f1721b5e6826e77c144/lib/src/stacked_table.rs | lib/src/stacked_table.rs | // Copyright 2021 The Jujutsu Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | rust | Apache-2.0 | 10efcf35613c9c2076278f1721b5e6826e77c144 | 2026-01-04T15:37:48.912814Z | false |
jj-vcs/jj | https://github.com/jj-vcs/jj/blob/10efcf35613c9c2076278f1721b5e6826e77c144/lib/src/fmt_util.rs | lib/src/fmt_util.rs | // Copyright 2023 The Jujutsu Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | rust | Apache-2.0 | 10efcf35613c9c2076278f1721b5e6826e77c144 | 2026-01-04T15:37:48.912814Z | false |
jj-vcs/jj | https://github.com/jj-vcs/jj/blob/10efcf35613c9c2076278f1721b5e6826e77c144/lib/src/eol.rs | lib/src/eol.rs | // Copyright 2025 The Jujutsu Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | rust | Apache-2.0 | 10efcf35613c9c2076278f1721b5e6826e77c144 | 2026-01-04T15:37:48.912814Z | false |
jj-vcs/jj | https://github.com/jj-vcs/jj/blob/10efcf35613c9c2076278f1721b5e6826e77c144/lib/src/revset_parser.rs | lib/src/revset_parser.rs | // Copyright 2021-2024 The Jujutsu Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | rust | Apache-2.0 | 10efcf35613c9c2076278f1721b5e6826e77c144 | 2026-01-04T15:37:48.912814Z | true |
jj-vcs/jj | https://github.com/jj-vcs/jj/blob/10efcf35613c9c2076278f1721b5e6826e77c144/lib/src/fix.rs | lib/src/fix.rs | // Copyright 2024 The Jujutsu Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | rust | Apache-2.0 | 10efcf35613c9c2076278f1721b5e6826e77c144 | 2026-01-04T15:37:48.912814Z | false |
jj-vcs/jj | https://github.com/jj-vcs/jj/blob/10efcf35613c9c2076278f1721b5e6826e77c144/lib/src/view.rs | lib/src/view.rs | // Copyright 2020 The Jujutsu Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | rust | Apache-2.0 | 10efcf35613c9c2076278f1721b5e6826e77c144 | 2026-01-04T15:37:48.912814Z | false |
jj-vcs/jj | https://github.com/jj-vcs/jj/blob/10efcf35613c9c2076278f1721b5e6826e77c144/lib/src/diff.rs | lib/src/diff.rs | // Copyright 2021 The Jujutsu Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | rust | Apache-2.0 | 10efcf35613c9c2076278f1721b5e6826e77c144 | 2026-01-04T15:37:48.912814Z | true |
jj-vcs/jj | https://github.com/jj-vcs/jj/blob/10efcf35613c9c2076278f1721b5e6826e77c144/lib/src/git.rs | lib/src/git.rs | // Copyright 2020 The Jujutsu Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | rust | Apache-2.0 | 10efcf35613c9c2076278f1721b5e6826e77c144 | 2026-01-04T15:37:48.912814Z | true |
jj-vcs/jj | https://github.com/jj-vcs/jj/blob/10efcf35613c9c2076278f1721b5e6826e77c144/lib/src/simple_op_store.rs | lib/src/simple_op_store.rs | // Copyright 2020 The Jujutsu Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | rust | Apache-2.0 | 10efcf35613c9c2076278f1721b5e6826e77c144 | 2026-01-04T15:37:48.912814Z | true |
jj-vcs/jj | https://github.com/jj-vcs/jj/blob/10efcf35613c9c2076278f1721b5e6826e77c144/lib/src/backend.rs | lib/src/backend.rs | // Copyright 2020 The Jujutsu Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | rust | Apache-2.0 | 10efcf35613c9c2076278f1721b5e6826e77c144 | 2026-01-04T15:37:48.912814Z | false |
jj-vcs/jj | https://github.com/jj-vcs/jj/blob/10efcf35613c9c2076278f1721b5e6826e77c144/lib/src/rewrite.rs | lib/src/rewrite.rs | // Copyright 2020 The Jujutsu Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | rust | Apache-2.0 | 10efcf35613c9c2076278f1721b5e6826e77c144 | 2026-01-04T15:37:48.912814Z | true |
jj-vcs/jj | https://github.com/jj-vcs/jj/blob/10efcf35613c9c2076278f1721b5e6826e77c144/lib/src/repo.rs | lib/src/repo.rs | // Copyright 2020 The Jujutsu Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | rust | Apache-2.0 | 10efcf35613c9c2076278f1721b5e6826e77c144 | 2026-01-04T15:37:48.912814Z | true |
jj-vcs/jj | https://github.com/jj-vcs/jj/blob/10efcf35613c9c2076278f1721b5e6826e77c144/lib/src/config_resolver.rs | lib/src/config_resolver.rs | // Copyright 2024 The Jujutsu Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | rust | Apache-2.0 | 10efcf35613c9c2076278f1721b5e6826e77c144 | 2026-01-04T15:37:48.912814Z | true |
jj-vcs/jj | https://github.com/jj-vcs/jj/blob/10efcf35613c9c2076278f1721b5e6826e77c144/lib/src/merged_tree.rs | lib/src/merged_tree.rs | // Copyright 2023 The Jujutsu Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | rust | Apache-2.0 | 10efcf35613c9c2076278f1721b5e6826e77c144 | 2026-01-04T15:37:48.912814Z | true |
jj-vcs/jj | https://github.com/jj-vcs/jj/blob/10efcf35613c9c2076278f1721b5e6826e77c144/lib/src/op_walk.rs | lib/src/op_walk.rs | // Copyright 2020-2023 The Jujutsu Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | rust | Apache-2.0 | 10efcf35613c9c2076278f1721b5e6826e77c144 | 2026-01-04T15:37:48.912814Z | false |
jj-vcs/jj | https://github.com/jj-vcs/jj/blob/10efcf35613c9c2076278f1721b5e6826e77c144/lib/src/content_hash.rs | lib/src/content_hash.rs | //! Portable, stable hashing suitable for identifying values
use blake2::Blake2b512;
// Re-export DigestUpdate so that the ContentHash proc macro can be used in
// external crates without directly depending on the digest crate.
pub use digest::Update as DigestUpdate;
use itertools::Itertools as _;
pub use jj_lib_proc_... | rust | Apache-2.0 | 10efcf35613c9c2076278f1721b5e6826e77c144 | 2026-01-04T15:37:48.912814Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.