From: Junio C Hamano <gitster@pobox.com>
To: Mike Hommey <mh@glandium.org>
Cc: git@vger.kernel.org, ps@pks.im, sandals@crustytoothpaste.net
Subject: Re: [PATCH v3] Move rust gitcore crate to a different subdirectory
Date: Wed, 09 Sep 2026 12:54:35 -0700 [thread overview]
Message-ID: <xmqqbja6qjyc.fsf@gitster.g> (raw)
In-Reply-To: <20260909013858.1729643-1-mh@glandium.org> (Mike Hommey's message of "Wed, 9 Sep 2026 10:38:58 +0900")
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.
> diff --git a/Makefile b/Makefile
> index d4b775953d..7991fa378d 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1571,11 +1571,13 @@ CLAR_TEST_OBJS += $(UNIT_TEST_DIR)/unit-test.o
>
> UNIT_TEST_OBJS += $(UNIT_TEST_DIR)/test-lib.o
>
> -RUST_SOURCES += src/csum_file.rs
> -RUST_SOURCES += src/hash.rs
> -RUST_SOURCES += src/lib.rs
> -RUST_SOURCES += src/loose.rs
> -RUST_SOURCES += src/varint.rs
> +RUST_SOURCES += rust/src/csum_file.rs
> +RUST_SOURCES += rust/src/hash.rs
> +RUST_SOURCES += rust/src/lib.rs
> +RUST_SOURCES += rust/src/loose.rs
> +RUST_SOURCES += rust/src/varint.rs
> +RUST_SOURCES += rust/src/lib.rs
> +RUST_SOURCES += rust/src/varint.rs
Two files, lib and varint, are listed twice here. A rebase error or
something?
> @@ -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?
next prev parent reply other threads:[~2026-09-09 19:54 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-04 23:22 [RFC PATCH] Move rust gitcore crate to a different subdirectory Mike Hommey
2026-02-05 0:10 ` brian m. carlson
2026-02-05 1:45 ` Mike Hommey
2026-02-05 2:06 ` brian m. carlson
2026-02-05 4:55 ` Mike Hommey
2026-02-09 22:48 ` [PATCH v2] " Mike Hommey
2026-09-09 1:38 ` [PATCH v3] " Mike Hommey
2026-09-09 19:54 ` Junio C Hamano [this message]
2026-09-10 12:09 ` Mike Hommey
2026-09-09 21:13 ` brian m. carlson
2026-09-10 12:05 ` Mike Hommey
2026-09-10 6:27 ` Tuomas Ahola
2026-09-10 12:21 ` Junio C Hamano
2026-09-10 12:10 ` [PATCH v4] " Mike Hommey
2026-09-10 17:45 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqbja6qjyc.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=mh@glandium.org \
--cc=ps@pks.im \
--cc=sandals@crustytoothpaste.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.