Skip to content

Add contextual git directories - #10195

Closed
jedevc wants to merge 2 commits into
dagger:mainfrom
jedevc:contextual-git
Closed

jedevc wants to merge 2 commits into
dagger:mainfrom
jedevc:contextual-git

Conversation

@jedevc

@jedevc jedevc commented Apr 17, 2025 •

Copy link
Copy Markdown
Contributor

Fixes #8520

Warning

This PR is under construction! 👷‍♀️

This allows a module to get git information about itself - it can do this through the core Git type. Later on, we'll extend the API with more functionality, like in #9968 which will be able to track dirty state, and get diffs.

This was previously sort of possible, by using a context dir and calling .asGit on it, but:

  1. it's not particularly ergonomic, and doesn't convey the user's intention particularly well
  2. it has to upload all the files in the local directory to handle this - we should be able to apply optimizations in quite a few cases, which should make it faster.

TODO:

defaultPath string
// Only applies to arguments of type GitRepository or GitRef.
// If the argument is not set, load it from the given path in the context git
defaultGit string

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.

Note for me: it needs to add an option to the Elixir SDK to support this feature.

@github-actions

github-actions Bot commented May 7, 2025

Copy link
Copy Markdown
Contributor

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions

Copy link
Copy Markdown
Contributor

This PR was closed because it has been stalled for 7 days with no activity.

@github-actions github-actions Bot closed this May 14, 2025
@jedevc jedevc reopened this May 14, 2025
@github-actions

Copy link
Copy Markdown
Contributor

This PR was closed because it has been stalled for 7 days with no activity.

@github-actions github-actions Bot closed this May 22, 2025
@jedevc jedevc mentioned this pull request Aug 5, 2025
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.

API to query current git context

2 participants