helm-git icon indicating copy to clipboard operation
helm-git copied to clipboard

Bug: .git/info/sparse-checkout: No such file or directory

Open hinricht opened this issue 2 years ago • 3 comments

I'm trying to add a git helm repo URL including a branch. It works, but I get this debug message:

./helm-git-plugin.sh: line 113: .git/info/sparse-checkout: No such file or directory
  • helm-git version: 0.14.3
  • helm version: v3.11.0

Steps To Reproduce

  1. Install latest helm-git
  2. Run helm --kube-context mastodon-dev repo add mastodon "git+https://github.com/hinricht/chart@.?ref=fix_streaming_route" --force-update

Link to chart repository: https://github.com/hinricht/chart/tree/fix_streaming_route

The current behavior

The helm repo is added fine, but the debug messages indicate sth is wrong on the way:

❯ HELM_GIT_DEBUG=1 helm --kube-context mastodon-dev repo add mastodon "git+https://github.com/hinricht/chart@.?ref=fix_streaming_route" --force-update
Debug[18055] in plugin 'helm-git': repo: https://github.com/hinricht/chart ref: fix_streaming_route path: . file: index.yaml sparse: 1 depupdate: 1 package: 1
Debug[18055] in plugin 'helm-git': helm_repo_uri: git+https://github.com/hinricht/chart@.?ref=fix_streaming_route&sparse=1&depupdate=1&package=1
./helm-git-plugin.sh: line 113: .git/info/sparse-checkout: No such file or directory
Debug[18180] in plugin 'helm-git': repo: https://github.com/hinricht/chart ref: fix_streaming_route path: . file: index.yaml sparse: 1 depupdate: 1 package: 1
Debug[18180] in plugin 'helm-git': helm_repo_uri: git+https://github.com/hinricht/chart@.?ref=fix_streaming_route&sparse=1&depupdate=1&package=1
./helm-git-plugin.sh: line 113: .git/info/sparse-checkout: No such file or directory
Debug[18180] in plugin 'helm-git': Returning target: /tmp/helm-git.E3E34H/index.yaml
Debug[18055] in plugin 'helm-git': Returning target: /tmp/helm-git.5asNt9/index.yaml
"mastodon" has been added to your repositories

The expected behavior

helm-git should not complain about non-existing files.

hinricht avatar Feb 20 '23 09:02 hinricht

Hello @hinricht, you should be able to disable sparse checkout in the meantime like this:

git+https://github.com/hinricht/chart@.?ref=fix_streaming_route&sparse=0

I guess you're issue is linked to https://github.com/aslafy-z/helm-git/issues/9. Can you share your Git version?

aslafy-z avatar Feb 20 '23 11:02 aslafy-z

I'm using git 2.39.2

varac avatar Feb 20 '23 12:02 varac

Hey @varac, can you please try with helm plugin install https://github.com/aslafy-z/helm-git --version 5683385eae278be4709838fdc622513f5d97d947? Thank you

aslafy-z avatar Mar 06 '24 11:03 aslafy-z