Skip to content

feat:Build an IDX file generator and wraps a PackEncoder to provide both pack and idx file generation functionality.#45

Merged
genedna merged 12 commits into
libra-tools:mainfrom
pleasedontbreak123:main
Dec 11, 2025
Merged

feat:Build an IDX file generator and wraps a PackEncoder to provide both pack and idx file generation functionality.#45
genedna merged 12 commits into
libra-tools:mainfrom
pleasedontbreak123:main

Conversation

@pleasedontbreak123

@pleasedontbreak123 pleasedontbreak123 commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

This PR adds a feature to generate Git pack and index files by creating an IDX file generator that encapsulates the PackEncoder, allowing seamless creation of both pack and idx files.

  1. General-purpose IdxBuilder ,that provides conversion from entries to idx entries.
  2. Collect idx entries during the encoding process.
  3. An function for generating both pack and idx files.

link #29

In my environment, I encountered an error because flate 1.1.7 was yanked, so I downgraded it.

and I encountered a lot error in buck building(flate , wasm,windows).At last it buid success at my env,but i can't figure it all out
;(

@genedna genedna requested a review from Copilot December 9, 2025 08:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses build environment compatibility issues encountered on Windows, particularly related to Buck2 build system configuration. The changes primarily focus on updating path separators in BUCK build files to use Windows-style backslashes and updating various dependency versions to resolve yanked packages and version conflicts.

Key changes:

  • Updated path separators from Unix-style / to Windows-style \\ in BUCK build configuration files
  • Downgraded flate2 from 1.1.7 to 1.1.5 to avoid yanked version
  • Updated various Rust dependency versions (log, syn, derive_more, etc.) to resolve compatibility issues

Reviewed changes

Copilot reviewed 299 out of 420 changed files in this pull request and generated 2 comments.

File Description
third-party/rust/crates/*/BUCK Changed crate_root paths from forward slashes to backslashes for Windows compatibility
third-party/rust/crates/flate2/1.1.5/BUCK Downgraded from yanked version 1.1.7 to stable 1.1.5
src/protocol/*.rs Applied clippy suggestions to use inline format strings

Comment thread third-party/rust/crates/subtle/2.6.1/BUCK Outdated
Comment thread src/protocol/types.rs
Capability::AllowTipSha1InWant => write!(f, "allow-tip-sha1-in-want"),
Capability::AllowReachableSha1InWant => write!(f, "allow-reachable-sha1-in-want"),
Capability::PushCert(value) => write!(f, "push-cert={}", value),
Capability::PushCert(value) => write!(f, "push-cert={value}"),

Copilot AI Dec 9, 2025

Copy link

Choose a reason for hiding this comment

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

[nitpick] These format string changes are Rust 2021 edition improvements that eliminate the need for numbered placeholders. While these are good style improvements, they are unrelated to the PR's stated purpose of 'building an IDX file generator'. Consider separating formatting/style changes into a dedicated PR to maintain clear change history.

Copilot uses AI. Check for mistakes.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 142 out of 143 changed files in this pull request and generated no new comments.

name = "backtrace",
srcs = [":backtrace-vendor"],
crate = "backtrace",
crate_root = "vendor/src\\lib.rs",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@pleasedontbreak123 , 在这里还是有路径问题,需要检查所有的新加 BUCK 文件

@genedna genedna merged commit 3bb3073 into libra-tools:main Dec 11, 2025
8 checks passed
genedna pushed a commit to genedna/git-internal that referenced this pull request Mar 15, 2026
…oth pack and idx file generation functionality. (libra-tools#45)

* before changes in encoding

* complete build idx

* fix clippy

* fix buck

* fix buck

* fix

* fix buck

* fix buck (at least buck BUILD SUCCEEDED in my env.it's troublesome)

* fix buck (at least buck BUILD SUCCEEDED in my env.it's troublesome)

* fix buck

* fix buck

* rerun migrate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants