Skip to content

Makefile: Add BIND_GIT variable#48303

Merged
vvoland merged 1 commit intomoby:masterfrom
vvoland:makefile-bindgit
Aug 8, 2024
Merged

Makefile: Add BIND_GIT variable#48303
vvoland merged 1 commit intomoby:masterfrom
vvoland:makefile-bindgit

Conversation

@vvoland
Copy link
Copy Markdown
Contributor

@vvoland vvoland commented Aug 7, 2024

Defining BIND_GIT will also bind mount the common .git directory into the dev container.
This makes it possible to run some hack/* scripts which rely on git when running the container in a git worktree.

- How to verify it

$ git worktree add asdf
$ cd asdf
$ make BIND_GIT=1 validate-all

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

@vvoland vvoland added this to the 28.0.0 milestone Aug 7, 2024
@vvoland vvoland self-assigned this Aug 7, 2024
Comment thread Makefile Outdated
Defining BIND_GIT will bind mount the common .git directory into the dev
container.
This makes it possible to run some hack/* scripts which rely on `git`
when running the container in a git worktree.

Signed-off-by: Paweł Gronowski <[email protected]>
Copy link
Copy Markdown
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

generally LGTM

I must say that we should have a look at all options we have, as the list is growing rapidly, and I wonder if we can simplify things somehow.

LOL, I initially was confused as well ("isn't BIND_DIR already mounting all the things?" but realised that doesn't work with worktree)

@thaJeztah
Copy link
Copy Markdown
Member

I can /cc @tianon for extra eyes if we want to

Copy link
Copy Markdown
Member

@tianon tianon left a comment

Choose a reason for hiding this comment

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

Agreed that this whole thing is pretty "byzantine" now but the use case here is pretty clear 👍

@vvoland vvoland merged commit b7eeb49 into moby:master Aug 8, 2024
@thaJeztah
Copy link
Copy Markdown
Member

Thanks @tianon !

Adding "Byzantine" to my list of pretty words to describe ugly things 😂

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants