Skip to content

[BUG] shp build upload incorrectly excludes real files whose names start with .git #408

Description

@mohit-bhandari45

Is there an existing issue for this?

  • I have searched the existing issues

Kubernetes Version

N/A

Shipwright Version

Shipwright version: shp (CLI), built from main at a45e161 — client-side bug in pkg/shp/streamer/tar.go; independent of the Shipwright Build operator version.

Current Behavior

shp build upload incorrectly excludes legitimate source files whose names start with .git. The Tar.skipPath function uses strings.HasPrefix(fpath, path.Join(t.src, ".git")), which matches .gitignore, .gitattributes, .gitconfig, .gitkeep, etc., in addition to the actual .git directory. As a result, these files are silently omitted from the uploaded tar archive.

Expected Behavior

Only the actual .git directory and its contents should be excluded from the upload. Legitimate source files and directories whose names merely start with .git, such as .gitignore, .gitattributes, .gitconfig, and .gitkeep, should be included in the uploaded tar archive.

Steps To Reproduce

No response

Anything else?

No response

Activity

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

Metadata

Metadata

Labels

kind/bugCategorizes issue or PR as related to a bug.

Type

No type

Projects

  • Status
    No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions