Skip to content

fetch remote ref during update on git repository #527

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

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

Conversation

kirecek
Copy link

@kirecek kirecek commented Apr 23, 2025

It seems getter.Get during update does not use the same ref as in clone command.

The repetitive call of .Get on url without specified ref

        src := "git::https://github.com/hashicorp/go-getter"
        dest := "/tmp/test"

	err := getter.Get(dest, src)
	if err != nil {
		log.Fatalf("get repo: %v", err)
	}

fails with the following error:

/usr/bin/git exited with 128: fatal: empty string is not a valid pathspec. please use . instead if you meant to match all paths

Is this by design or should the library match clone behaviour?

@kirecek kirecek requested a review from a team as a code owner April 23, 2025 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant