Re: [PATCH v3] Move rust gitcore crate to a different subdirectory
- From
Mike Hommey <mh@glandium.org>
- Date
- Sep 10, 2026, 12:09 UTC
- Message-ID
- <mzrpnwtg3nkij74yp35gz74u7svzedx2kom2dsiq3dk7zhb7yp@4fihynejp63w>
- In-Reply-To
- <xmqqbja6qjyc.fsf@gitster.g>
On Wed, Sep 09, 2026 at 12:54:35PM -0700, Junio C Hamano wrote:
Show 35 quoted lines
> Mike Hommey <mh@glandium.org> writes: > > > > Having `Cargo.toml` at the top-level of the repository implies that one > > can run `cargo build` directly, but this doesn't produce anything useful > > on its own. > > > > Additionally, when including the git source as a submodule of a Rust > > project, it prevents the git source from being included at all in the > > crate package because cargo skips directories that contain a Cargo.toml, > > assuming that everything in the directory is relevant to the crate. > > > > This moves all Rust-specific files into a dedicated `rust/` > > subdirectory. > > Very readable and understandable. It is customary in this project > to write that last sentence in imperative mood, though. I.e. "Move > all files there". > > > Signed-off-by: Mike Hommey <mh@glandium.org> > > > > diff --git a/.gitignore b/.gitignore > > index 4da58c6754..3ac0685800 100644 > > --- a/.gitignore > > +++ b/.gitignore > > @@ -261,3 +261,5 @@ Release/ > > /contrib/buildsystems/out > > /contrib/libgit-rs/target > > /contrib/libgit-sys/target > > +/rust/target > > +/rust/Cargo.lock > > There are /target/ and /Cargo.lock listed in this file; aren't these > two entries meant to _replace_ them? I am wondering if they need to > disappear as part of this patfch.
This and the RUST_SOURCES thing you raised are rebase errors, apparently.
Show 9 quoted lines
> > @@ -3913,7 +3915,7 @@ clean: profile-clean coverage-clean cocciclean > > $(RM) $(FUZZ_PROGRAMS) > > $(RM) $(SP_OBJ) > > $(RM) $(HCC) > > - $(RM) -r Cargo.lock target/ > > + $(RM) -r Cargo.lock rust/target/ > > The Cargo.lock file does not move together with the rest? That > contradicts with what .gitignore says, doesn't it?
Huh, thanks for noticing this one.
Mike