Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions .github/workflows/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,13 @@ jobs:
with:
submodules: recursive

- name: Install nightly toolchain
run: |
rustup toolchain install nightly --profile minimal
rustup component add rustfmt --toolchain nightly

- name: Run rustfmt
run: cargo fmt --all --check
run: cargo +nightly fmt --all --check

clippy:
name: Clippy Check
Expand All @@ -43,6 +48,7 @@ jobs:
pull-requests: write
env:
CARGO_TERM_COLOR: always
RUSTUP_TOOLCHAIN: stable

steps:
- name: Checkout repository
Expand All @@ -51,12 +57,16 @@ jobs:
submodules: recursive

- name: Run cargo clippy
run: cargo clippy -- -D warnings
run: cargo clippy --all-targets --all-features -- -D warnings
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The clippy command now includes --all-targets which will check tests, benches, examples, and all other targets. This is good for comprehensive coverage, but be aware it may catch issues in code that wasn't previously checked. Consider mentioning this expanded scope in the PR description to set expectations.

Copilot uses AI. Check for mistakes.

redundancy:
name: Redundancy Check
runs-on: [ self-hosted ]

env:
CARGO_TERM_COLOR: always
RUSTUP_TOOLCHAIN: stable

steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -82,6 +92,10 @@ jobs:

runs-on: [ self-hosted ]

env:
CARGO_TERM_COLOR: always
RUSTUP_TOOLCHAIN: stable

steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -97,6 +111,7 @@ jobs:
runs-on: [ self-hosted ]
env:
CARGO_TERM_COLOR: always
RUSTUP_TOOLCHAIN: stable

steps:
- name: Checkout repository
Expand All @@ -106,4 +121,4 @@ jobs:
lfs: true

- name: Run cargo test
run: git lfs pull && cargo test --all
run: git lfs pull && cargo test --all
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line appears unchanged in the diff (no '+' or '-' marker on line 123), but the diff shows it was touched. The actual change appears to be whitespace-only or formatting. If no functional change was intended, consider ensuring the file wasn't accidentally modified.

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a newline at the end of this file following POSIX standards. Many tools expect text files to end with a newline character.

Suggested change
run: git lfs pull && cargo test --all
run: git lfs pull && cargo test --all

Copilot uses AI. Check for mistakes.
1 change: 0 additions & 1 deletion .github/workflows/claude-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ jobs:

# Enable progress tracking and show full Claude output in logs
track_progress: true
show_full_output: true

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intentional removal - Removing show_full_output: true:

This change reduces log verbosity. The parameter was likely removed because:

  • track_progress: true (line 140) already provides progress visibility
  • Full output can be very verbose and clutter logs
  • Most users don't need to see every detail of Claude's analysis

✅ This is a reasonable default unless debugging is needed.

# Custom review instructions passed to Claude
prompt: |
Expand Down
29 changes: 1 addition & 28 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ on:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent simplification - Removing push and schedule triggers makes sense for CodeQL:

Benefits:

  • Reduces unnecessary workflow runs and CI costs
  • pull_request scanning is sufficient for catching issues before merge
  • Weekly scheduled scans were redundant if all PRs are scanned

This aligns with best practices for PR-focused security scanning.

schedule:
- cron: '22 5 * * 4'

jobs:
analyze:
Expand All @@ -27,7 +25,7 @@ jobs:
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
runs-on: 'ubuntu-latest'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good simplification - Removing the Swift/macOS conditional:

Benefits:

  • The project doesn't use Swift (it's a Rust project), so this conditional was unnecessary
  • Always using ubuntu-latest is more predictable and cost-effective
  • Cleaner, more maintainable configuration

Original: runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
New: runs-on: 'ubuntu-latest'

permissions:
# required for all workflows
security-events: write
Expand All @@ -47,14 +45,6 @@ jobs:
build-mode: none
- language: rust
build-mode: none
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -78,23 +68,6 @@ jobs:
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- name: Run manual build steps
if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
Comment on lines 48 to 72

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent cleanup - Removing the manual build step section:

Benefits:

  • Eliminates 20+ lines of boilerplate comments and placeholder code
  • The manual build step was never used (always exited with error code 1)
  • Makes the workflow more concise and focused
  • All languages now use autobuild or none, so manual builds aren't needed

This is a significant improvement in workflow readability.

with:
Expand Down
18 changes: 9 additions & 9 deletions BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@ rust_library(
"//third-party/rust/crates/bstr/1.12.1:bstr",
"//third-party/rust/crates/byteorder/1.5.0:byteorder",
"//third-party/rust/crates/bytes/1.11.0:bytes",
"//third-party/rust/crates/chrono/0.4.42:chrono",
"//third-party/rust/crates/chrono/0.4.43:chrono",
"//third-party/rust/crates/colored/3.0.0:colored",
"//third-party/rust/crates/crc32fast/1.5.0:crc32fast",
"//third-party/rust/crates/dashmap/6.1.0:dashmap",
"//third-party/rust/crates/diffs/0.5.1:diffs",
"//third-party/rust/crates/encoding_rs/0.8.35:encoding_rs",
"//third-party/rust/crates/flate2/1.1.5:flate2",
"//third-party/rust/crates/flate2/1.1.8:flate2",
"//third-party/rust/crates/futures-util/0.3.31:futures-util",
"//third-party/rust/crates/futures/0.3.31:futures",
"//third-party/rust/crates/hex/0.4.3:hex",
"//third-party/rust/crates/libc/0.2.179:libc",
"//third-party/rust/crates/libc/0.2.180:libc",
"//third-party/rust/crates/lru-mem/0.3.0:lru-mem",
"//third-party/rust/crates/memchr/2.7.6:memchr",
"//third-party/rust/crates/natord/1.0.9:natord",
Expand Down Expand Up @@ -88,17 +88,17 @@ rust_test(
"//third-party/rust/crates/bstr/1.12.1:bstr",
"//third-party/rust/crates/byteorder/1.5.0:byteorder",
"//third-party/rust/crates/bytes/1.11.0:bytes",
"//third-party/rust/crates/chrono/0.4.42:chrono",
"//third-party/rust/crates/chrono/0.4.43:chrono",
"//third-party/rust/crates/colored/3.0.0:colored",
"//third-party/rust/crates/crc32fast/1.5.0:crc32fast",
"//third-party/rust/crates/dashmap/6.1.0:dashmap",
"//third-party/rust/crates/diffs/0.5.1:diffs",
"//third-party/rust/crates/encoding_rs/0.8.35:encoding_rs",
"//third-party/rust/crates/flate2/1.1.5:flate2",
"//third-party/rust/crates/flate2/1.1.8:flate2",
"//third-party/rust/crates/futures-util/0.3.31:futures-util",
"//third-party/rust/crates/futures/0.3.31:futures",
"//third-party/rust/crates/hex/0.4.3:hex",
"//third-party/rust/crates/libc/0.2.179:libc",
"//third-party/rust/crates/libc/0.2.180:libc",
"//third-party/rust/crates/lru-mem/0.3.0:lru-mem",
"//third-party/rust/crates/memchr/2.7.6:memchr",
"//third-party/rust/crates/natord/1.0.9:natord",
Expand Down Expand Up @@ -146,17 +146,17 @@ rust_test(
"//third-party/rust/crates/bstr/1.12.1:bstr",
"//third-party/rust/crates/byteorder/1.5.0:byteorder",
"//third-party/rust/crates/bytes/1.11.0:bytes",
"//third-party/rust/crates/chrono/0.4.42:chrono",
"//third-party/rust/crates/chrono/0.4.43:chrono",
"//third-party/rust/crates/colored/3.0.0:colored",
"//third-party/rust/crates/crc32fast/1.5.0:crc32fast",
"//third-party/rust/crates/dashmap/6.1.0:dashmap",
"//third-party/rust/crates/diffs/0.5.1:diffs",
"//third-party/rust/crates/encoding_rs/0.8.35:encoding_rs",
"//third-party/rust/crates/flate2/1.1.5:flate2",
"//third-party/rust/crates/flate2/1.1.8:flate2",
"//third-party/rust/crates/futures-util/0.3.31:futures-util",
"//third-party/rust/crates/futures/0.3.31:futures",
"//third-party/rust/crates/hex/0.4.3:hex",
"//third-party/rust/crates/libc/0.2.179:libc",
"//third-party/rust/crates/libc/0.2.180:libc",
"//third-party/rust/crates/lru-mem/0.3.0:lru-mem",
"//third-party/rust/crates/memchr/2.7.6:memchr",
"//third-party/rust/crates/natord/1.0.9:natord",
Expand Down
14 changes: 7 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "git-internal"
version = "0.4.0"
version = "0.4.1"
edition = "2024"
license = "MIT"
description = "Git-Internal is a high-performance Rust library for encoding and decoding Git internal objects and Pack files."
Expand Down Expand Up @@ -28,7 +28,7 @@ encoding_rs = "0.8.35"
rayon = "1.11.0"
ahash = "0.8.12"
diffs = "0.5.1"
libc = "0.2.179"
libc = "0.2.180"
async-trait = "0.1.89"
futures = "0.3.31"
tokio-stream = "0.1.18"
Expand All @@ -40,9 +40,9 @@ sha2 = "0.10.9"
crc32fast = "1.4"
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The version specifier was changed from '2.0.16+zstd.1.5.7' to '2.0.16', removing the build metadata. While this may work, the original version string included important information about the bundled zstd version (1.5.7). Consider adding a comment to document which zstd version this corresponds to for future maintainability.

Suggested change
crc32fast = "1.4"
crc32fast = "1.4"
# zstd-sys 2.0.16 corresponds to bundled zstd 1.5.7 (previously encoded as +zstd.1.5.7)

Copilot uses AI. Check for mistakes.
zstd-sys = { version = "2.0.16+zstd.1.5.7", features = ["experimental"] }
sea-orm = { version = "1.1.17", features = ["sqlx-sqlite"] }
flate2 = { version = "1.1.5", features = ["zlib"] }
flate2 = { version = "1.1.8", features = ["zlib"] }
serde = { version = "1.0.228", features = ["derive"] }
chrono = { version = "0.4.42", features = ["serde"] }
chrono = { version = "0.4.43", features = ["serde"] }
uuid = { version = "1.19.0", features = ["v4"] }
tokio = { version = "1.49.0", features = ["fs", "io-util"] }
bincode = { version = "2.0.1", features = ["serde"] }
Expand Down
52 changes: 52 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,55 @@ A simple approach:
### Benchmark

**TODO**

## Contributing

### Pre-submission Checks

Before submitting a Pull Request, please ensure your code passes the following checks:

```bash
# Run clippy with all warnings treated as errors (warnings will be treated as errors)
cargo clippy --all-targets --all-features -- -D warnings
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The README states 'Both commands must complete without any errors or warnings' but using -D warnings already enforces this by treating warnings as errors. Consider clarifying that this means 'no warnings will be tolerated' rather than implying there are two separate categories to check.

Copilot uses AI. Check for mistakes.

# Check code formatting (requires nightly toolchain)
cargo +nightly fmt --all --check
```

**Both commands must complete without any warnings.** The clippy check treats all warnings as errors, and the formatter check ensures code follows the project style guide. Only PRs that pass these checks will be accepted for merge.

If the formatting check fails, you can automatically fix formatting issues by running:

```bash
cargo +nightly fmt --all
```

### Buck2 Build Requirements

This project builds with Buck2. Please install both Buck2 and `cargo-buckal` before development:

```bash
# Install buck2: download the latest release tarball from
# https://github.com/facebook/buck2/releases, extract the binary,
# and place it in ~/.cargo/bin (ensure ~/.cargo/bin is on PATH).
# Example (replace <tag> and <platform> with the latest for your OS):
wget https://github.com/facebook/buck2/releases/download/<tag>/buck2-<platform>.tar.gz
tar -xzf buck2-<platform>.tar.gz
mv buck2 ~/.cargo/bin/

# Install cargo-buckal (requires Rust toolchain)
cargo install --git https://github.com/buck2hub/cargo-buckal.git
```

Pull Requests must also pass the Buck2 build:

```bash
cargo buckal build
```

When you update dependencies in Cargo.toml, regenerate Buck metadata and third-party lockfiles:

```bash
cargo buckal migrate
```

Loading