Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(forge): init a git repo at root during init unless explicitely stated #9695

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

0xvv
Copy link
Contributor

@0xvv 0xvv commented Jan 16, 2025

Motivation

Fixes: #3962

Solution

Force initialization of a git repo at the root of the foundry folder unless there already is one or the flag --use-parent-git is present and there is indeed a parent git repo.

The --use-parent-git flag replicates the current behavior in case some people prefer it.

Tested the reproductions steps of the issue after to be sure.
The fix in forge init leads to the expected behavior for forge install

@0xvv 0xvv force-pushed the fix-git-submodules branch 2 times, most recently from 4f7dba2 to 739b81a Compare January 17, 2025 00:17
@0xvv 0xvv force-pushed the fix-git-submodules branch from 739b81a to 19cd229 Compare January 17, 2025 00:32
@0xvv 0xvv marked this pull request as ready for review January 17, 2025 00:34
@grandizzy
Copy link
Collaborator

I am not sure I like the way git submodules is desired to be used in #3962 (could become beefy and hard to maintain) but rather have different projects / deps with their own foundry.toml file and submodules. @zerosnacks @yash-atreya wdyt?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

forge install modifies top-level .gitmodules in existing project repo instead of where foundry.toml lives
2 participants