Skip to content

Can't access .git from context directory, when loading module remotely #8387

Closed

Description

@shykes

Problem

When loading a module remotely, .git is stripped from the module's context directory. This breaks functions that rely on accessing .git.

Example:

func GitHead(
// +optional
// +defaultPath="/.git"
gitDir *dagger.Directory,
) *dagger.File {
  return gitDir.File("HEAD")
}

This function will work when loading the module locally:

dagger call -m . git-head

But it will not work when loading remotely:

dagger call -m github.com/foo/bar git-head

Solution

TBD

Activity

  1. jedevc commented on Sep 11, 2024

    @jedevc
    Contributor

    This should be fixed by #8318, which will default to keeping the git directory around in all cases.

  2. added
    kind/bug
    on Sep 17, 2024
  3. shykes commented on Sep 25, 2024

    @shykes
    ContributorAuthor

    Just checking that @sipsma 's concerns with this (from a caching perspective) are addressed?

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions