nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: helm/helm
Pull request #8411 (2020-07-07 17:40:41)

bump version to v3.3
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
(cherry picked from commit f3783a47a418a5bcd2a4323044f3ec07849664f6)



Patch:
diff --git a/internal/version/version.go b/internal/version/version.go
index baa65a028..712aae640 100644
--- a/internal/version/version.go
+++ b/internal/version/version.go
@@ -30,7 +30,7 @@ var (
 	// Increment major number for new feature additions and behavioral changes.
 	// Increment minor number for bug fixes and performance enhancements.
 	// Increment patch number for critical fixes to existing releases.
-	version = "v3.2"
+	version = "v3.3"
 
 	// metadata is extra build time data
 	metadata = ""


Test patch:
diff --git a/cmd/helm/testdata/output/version-client-shorthand.txt b/cmd/helm/testdata/output/version-client-shorthand.txt
index d613309fe..910493bc4 100644
--- a/cmd/helm/testdata/output/version-client-shorthand.txt
+++ b/cmd/helm/testdata/output/version-client-shorthand.txt
@@ -1,1 +1,1 @@
-version.BuildInfo{Version:"v3.2", GitCommit:"", GitTreeState:"", GoVersion:""}
+version.BuildInfo{Version:"v3.3", GitCommit:"", GitTreeState:"", GoVersion:""}
diff --git a/cmd/helm/testdata/output/version-client.txt b/cmd/helm/testdata/output/version-client.txt
index d613309fe..910493bc4 100644
--- a/cmd/helm/testdata/output/version-client.txt
+++ b/cmd/helm/testdata/output/version-client.txt
@@ -1,1 +1,1 @@
-version.BuildInfo{Version:"v3.2", GitCommit:"", GitTreeState:"", GoVersion:""}
+version.BuildInfo{Version:"v3.3", GitCommit:"", GitTreeState:"", GoVersion:""}
diff --git a/cmd/helm/testdata/output/version-short.txt b/cmd/helm/testdata/output/version-short.txt
index 4d5034cea..a6c626024 100644
--- a/cmd/helm/testdata/output/version-short.txt
+++ b/cmd/helm/testdata/output/version-short.txt
@@ -1,1 +1,1 @@
-v3.2
+v3.3
diff --git a/cmd/helm/testdata/output/version-template.txt b/cmd/helm/testdata/output/version-template.txt
index 7c09e8d57..48c6d2b04 100644
--- a/cmd/helm/testdata/output/version-template.txt
+++ b/cmd/helm/testdata/output/version-template.txt
@@ -1,1 +1,1 @@
-Version: v3.2
\ No newline at end of file
+Version: v3.3
\ No newline at end of file
diff --git a/cmd/helm/testdata/output/version.txt b/cmd/helm/testdata/output/version.txt
index d613309fe..910493bc4 100644
--- a/cmd/helm/testdata/output/version.txt
+++ b/cmd/helm/testdata/output/version.txt
@@ -1,1 +1,1 @@
-version.BuildInfo{Version:"v3.2", GitCommit:"", GitTreeState:"", GoVersion:""}
+version.BuildInfo{Version:"v3.3", GitCommit:"", GitTreeState:"", GoVersion:""}
diff --git a/pkg/chartutil/capabilities_test.go b/pkg/chartutil/capabilities_test.go
index 489a472be..ae9624bca 100644
--- a/pkg/chartutil/capabilities_test.go
+++ b/pkg/chartutil/capabilities_test.go
@@ -62,7 +62,7 @@ func TestDefaultCapabilities(t *testing.T) {
 func TestDefaultCapabilitiesHelmVersion(t *testing.T) {
 	hv := DefaultCapabilities.HelmVersion
 
-	if hv.Version != "v3.2" {
-		t.Errorf("Expected default HelmVerison to be v3.2, got %q", hv.Version)
+	if hv.Version != "v3.3" {
+		t.Errorf("Expected default HelmVerison to be v3.3, got %q", hv.Version)
 	}
 }
Repository: helm/helm
Pull request #9195 (2021-01-06 02:38:12)

bump version to


Patch:
diff --git a/internal/version/version.go b/internal/version/version.go
index 73c433f57..15822e914 100644
--- a/internal/version/version.go
+++ b/internal/version/version.go
@@ -29,7 +29,7 @@ var (
 	//
 	// Increment major number for new feature additions and behavioral changes.
 	// Increment minor number for bug fixes and performance enhancements.
-	version = "v3.4"
+	version = "v3.5"
 
 	// metadata is extra build time data
 	metadata = ""


Test patch:
diff --git a/cmd/helm/testdata/output/version-client-shorthand.txt b/cmd/helm/testdata/output/version-client-shorthand.txt
index e37819483..9dc0a8cfa 100644
--- a/cmd/helm/testdata/output/version-client-shorthand.txt
+++ b/cmd/helm/testdata/output/version-client-shorthand.txt
@@ -1,1 +1,1 @@
-version.BuildInfo{Version:"v3.4", GitCommit:"", GitTreeState:"", GoVersion:""}
+version.BuildInfo{Version:"v3.5", GitCommit:"", GitTreeState:"", GoVersion:""}
diff --git a/cmd/helm/testdata/output/version-client.txt b/cmd/helm/testdata/output/version-client.txt
index e37819483..9dc0a8cfa 100644
--- a/cmd/helm/testdata/output/version-client.txt
+++ b/cmd/helm/testdata/output/version-client.txt
@@ -1,1 +1,1 @@
-version.BuildInfo{Version:"v3.4", GitCommit:"", GitTreeState:"", GoVersion:""}
+version.BuildInfo{Version:"v3.5", GitCommit:"", GitTreeState:"", GoVersion:""}
diff --git a/cmd/helm/testdata/output/version-short.txt b/cmd/helm/testdata/output/version-short.txt
index 794508350..3c81e0c56 100644
--- a/cmd/helm/testdata/output/version-short.txt
+++ b/cmd/helm/testdata/output/version-short.txt
@@ -1,1 +1,1 @@
-v3.4
+v3.5
diff --git a/cmd/helm/testdata/output/version-template.txt b/cmd/helm/testdata/output/version-template.txt
index eefb1dfcb..68945e7a4 100644
--- a/cmd/helm/testdata/output/version-template.txt
+++ b/cmd/helm/testdata/output/version-template.txt
@@ -1,1 +1,1 @@
-Version: v3.4
\ No newline at end of file
+Version: v3.5
\ No newline at end of file
diff --git a/cmd/helm/testdata/output/version.txt b/cmd/helm/testdata/output/version.txt
index e37819483..9dc0a8cfa 100644
--- a/cmd/helm/testdata/output/version.txt
+++ b/cmd/helm/testdata/output/version.txt
@@ -1,1 +1,1 @@
-version.BuildInfo{Version:"v3.4", GitCommit:"", GitTreeState:"", GoVersion:""}
+version.BuildInfo{Version:"v3.5", GitCommit:"", GitTreeState:"", GoVersion:""}
diff --git a/pkg/chartutil/capabilities_test.go b/pkg/chartutil/capabilities_test.go
index 04a6d36bb..7134abfc5 100644
--- a/pkg/chartutil/capabilities_test.go
+++ b/pkg/chartutil/capabilities_test.go
@@ -62,7 +62,7 @@ func TestDefaultCapabilities(t *testing.T) {
 func TestDefaultCapabilitiesHelmVersion(t *testing.T) {
 	hv := DefaultCapabilities.HelmVersion
 
-	if hv.Version != "v3.4" {
-		t.Errorf("Expected default HelmVersion to be v3.4, got %q", hv.Version)
+	if hv.Version != "v3.5" {
+		t.Errorf("Expected default HelmVersion to be v3.5, got %q", hv.Version)
 	}
 }
Repository: helm/helm
Pull request #9716 (2021-05-18 14:28:00)

bump version to v3.6.0
(cherry picked from commit af0feeddd91c729aa97327f33c9e3e3109b13561)



Patch:
diff --git a/internal/version/version.go b/internal/version/version.go
index 15822e914..4db8c0549 100644
--- a/internal/version/version.go
+++ b/internal/version/version.go
@@ -29,7 +29,7 @@ var (
 	//
 	// Increment major number for new feature additions and behavioral changes.
 	// Increment minor number for bug fixes and performance enhancements.
-	version = "v3.5"
+	version = "v3.6"
 
 	// metadata is extra build time data
 	metadata = ""


Test patch:
diff --git a/cmd/helm/testdata/output/version-client-shorthand.txt b/cmd/helm/testdata/output/version-client-shorthand.txt
index 9dc0a8cfa..02e210fb7 100644
--- a/cmd/helm/testdata/output/version-client-shorthand.txt
+++ b/cmd/helm/testdata/output/version-client-shorthand.txt
@@ -1,1 +1,1 @@
-version.BuildInfo{Version:"v3.5", GitCommit:"", GitTreeState:"", GoVersion:""}
+version.BuildInfo{Version:"v3.6", GitCommit:"", GitTreeState:"", GoVersion:""}
diff --git a/cmd/helm/testdata/output/version-client.txt b/cmd/helm/testdata/output/version-client.txt
index 9dc0a8cfa..02e210fb7 100644
--- a/cmd/helm/testdata/output/version-client.txt
+++ b/cmd/helm/testdata/output/version-client.txt
@@ -1,1 +1,1 @@
-version.BuildInfo{Version:"v3.5", GitCommit:"", GitTreeState:"", GoVersion:""}
+version.BuildInfo{Version:"v3.6", GitCommit:"", GitTreeState:"", GoVersion:""}
diff --git a/cmd/helm/testdata/output/version-short.txt b/cmd/helm/testdata/output/version-short.txt
index 3c81e0c56..cde1fbc45 100644
--- a/cmd/helm/testdata/output/version-short.txt
+++ b/cmd/helm/testdata/output/version-short.txt
@@ -1,1 +1,1 @@
-v3.5
+v3.6
diff --git a/cmd/helm/testdata/output/version-template.txt b/cmd/helm/testdata/output/version-template.txt
index 68945e7a4..84b18182b 100644
--- a/cmd/helm/testdata/output/version-template.txt
+++ b/cmd/helm/testdata/output/version-template.txt
@@ -1,1 +1,1 @@
-Version: v3.5
\ No newline at end of file
+Version: v3.6
\ No newline at end of file
diff --git a/cmd/helm/testdata/output/version.txt b/cmd/helm/testdata/output/version.txt
index 9dc0a8cfa..02e210fb7 100644
--- a/cmd/helm/testdata/output/version.txt
+++ b/cmd/helm/testdata/output/version.txt
@@ -1,1 +1,1 @@
-version.BuildInfo{Version:"v3.5", GitCommit:"", GitTreeState:"", GoVersion:""}
+version.BuildInfo{Version:"v3.6", GitCommit:"", GitTreeState:"", GoVersion:""}
diff --git a/pkg/chartutil/capabilities_test.go b/pkg/chartutil/capabilities_test.go
index a68d16b45..fad20f1dc 100644
--- a/pkg/chartutil/capabilities_test.go
+++ b/pkg/chartutil/capabilities_test.go
@@ -62,8 +62,8 @@ func TestDefaultCapabilities(t *testing.T) {
 func TestDefaultCapabilitiesHelmVersion(t *testing.T) {
 	hv := DefaultCapabilities.HelmVersion
 
-	if hv.Version != "v3.5" {
-		t.Errorf("Expected default HelmVersion to be v3.5, got %q", hv.Version)
+	if hv.Version != "v3.6" {
+		t.Errorf("Expected default HelmVersion to be v3.6, got %q", hv.Version)
 	}
 }
Repository: helm/helm
Pull request #9756 (2021-05-30 22:25:20)

Fix coalesce globals to prevent subchart globals to leak upstream
Signed-off-by: Giacomo Margaria <giacomo.margaria@gmail.com>

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. Make sure to read the Contributing Guide before submitting your PR: https://github.com/helm/helm/blob/main/CONTRIBUTING.md
2. If this PR closes another issue, add 'closes #<issue number>' somewhere in the PR summary. GitHub will automatically close that issue when this PR gets merged. Alternatively, adding 'refs #<issue number>' will not close the issue, but help provide the reviewer more context.-->

**What this PR does / why we need it**:
fixes: #9749
Make sure tables are copied *by value* and NOT *by reference* within `coalesceGlobals`.

**Special notes for your reviewer**:

**If applicable**:
- [ ] this PR contains documentation
- [x] this PR contains unit tests
- [ ] this PR has been tested for backwards compatibility



Patch:
diff --git a/pkg/chartutil/coalesce.go b/pkg/chartutil/coalesce.go
index e086d8b6e..7b1ee1d80 100644
--- a/pkg/chartutil/coalesce.go
+++ b/pkg/chartutil/coalesce.go
@@ -127,9 +127,10 @@ func coalesceGlobals(dest, src map[string]interface{}) {
 			// It's not clear if this condition can actually ever trigger.
 			log.Printf("key %s is table. Skipping", key)
 			continue
+		} else {
+			// TODO: Do we need to do any additional checking on the value?
+			dg[key] = val
 		}
-		// TODO: Do we need to do any additional checking on the value?
-		dg[key] = val
 	}
 	dest[GlobalKey] = dg
 }


Test patch:
diff --git a/pkg/chartutil/coalesce_test.go b/pkg/chartutil/coalesce_test.go
index 5a4656d71..fc55e0a25 100644
--- a/pkg/chartutil/coalesce_test.go
+++ b/pkg/chartutil/coalesce_test.go
@@ -87,6 +87,9 @@ func TestCoalesceValues(t *testing.T) {
 			&chart.Chart{
 				Metadata: &chart.Metadata{Name: "ahab"},
 				Values: map[string]interface{}{
+					"global": map[string]interface{}{
+						"nested": map[string]interface{}{"foo": "bar"},
+					},
 					"scope":  "ahab",
 					"name":   "ahab",
 					"boat":   true,
@@ -135,9 +138,11 @@ func TestCoalesceValues(t *testing.T) {
 		{"{{.pequod.ahab.scope}}", "whale"},
 		{"{{.pequod.ahab.nested.foo}}", "true"},
 		{"{{.pequod.ahab.global.name}}", "Ishmael"},
+		{"{{.pequod.ahab.global.nested.foo}}", "bar"},
 		{"{{.pequod.ahab.global.subject}}", "Queequeg"},
 		{"{{.pequod.ahab.global.harpooner}}", "Tashtego"},
 		{"{{.pequod.global.name}}", "Ishmael"},
+		{"{{.pequod.global.nested.foo}}", "<no value>"},
 		{"{{.pequod.global.subject}}", "Queequeg"},
 		{"{{.spouter.global.name}}", "Ishmael"},
 		{"{{.spouter.global.harpooner}}", "<no value>"},
Repository: helm/helm
Pull request #9822 (2021-06-17 15:14:01)

Fix encoded path for 'helm dependency build'
**What this PR does / why we need it**:

Fixes: #9821.

**Special notes for your reviewer**:

**If applicable**:
- [ ] this PR contains documentation
- [x] this PR contains unit tests
- [x] this PR has been tested for backwards compatibility


sathieu: @cndoit18 Please review this one (split out of #9763).
sathieu: @cndoit18 What is the status of this PR? Please review 👀 .
sathieu: @bacongobbler Please unblock tests for this PR, and please review :pray:.
sathieu: @hickeyma @mattfarina @jdolitsky @marckhouzam I'm desperately looking for someone to start the CI and review this PR :pray: 

Now that [Gitlab supports Helm charts](https://about.gitlab.com/releases/2021/07/22/gitlab-14-1-released/#build-publish-and-share-helm-charts), more people will be affected by this (even if it can be worked around by using the project id instead of the project path).
hickeyma: @sathieu I would like to test this fix manually first.  Do you have suggestion how to setup a repo path with encoded path? I tried using GitHub but it is unfortunately interpreting the path.
sathieu: Thanks @hickeyma You can test on gitlab.com. I've already uploaded charts here: https://gitlab.com/kubitus-project/kubitus-ingress-operator/-/packages

- https://gitlab.com/api/v4/projects/28163461/packages/helm/main -> works
- https://gitlab.com/api/v4/projects/kubitus-project%2Fkubitus-ingress-operator/packages/helm/main -> doesn't work, unless you apply this MR

NB: Gitlab doc is here: https://docs.gitlab.com/ee/user/packages/helm_repository/.

Patch:
diff --git a/pkg/downloader/manager.go b/pkg/downloader/manager.go
index 8d210ea70..b5d7e26b3 100644
--- a/pkg/downloader/manager.go
+++ b/pkg/downloader/manager.go
@@ -802,6 +802,7 @@ func normalizeURL(baseURL, urlOrPath string) (string, error) {
 		return urlOrPath, errors.Wrap(err, "base URL failed to parse")
 	}
 
+	u2.RawPath = path.Join(u2.RawPath, urlOrPath)
 	u2.Path = path.Join(u2.Path, urlOrPath)
 	return u2.String(), nil
 }


Test patch:
diff --git a/pkg/downloader/manager_test.go b/pkg/downloader/manager_test.go
index b2b32bf74..8b871e66e 100644
--- a/pkg/downloader/manager_test.go
+++ b/pkg/downloader/manager_test.go
@@ -55,6 +55,7 @@ func TestNormalizeURL(t *testing.T) {
 	}{
 		{name: "basic URL", base: "https://example.com", path: "http://helm.sh/foo", expect: "http://helm.sh/foo"},
 		{name: "relative path", base: "https://helm.sh/charts", path: "foo", expect: "https://helm.sh/charts/foo"},
+		{name: "Encoded path", base: "https://helm.sh/a%2Fb/charts", path: "foo", expect: "https://helm.sh/a%2Fb/charts/foo"},
 	}
 
 	for _, tt := range tests {
Repository: helm/helm
Pull request #9914 (2021-07-06 17:12:32)

feat(linter): check for nested resource-policy annotations
The 'helm.sh/resource-policy' annotation is only supported on top level
objects.  The annotation is ignored if given on a nested object within a
list.

Ref #9829


Patch:
diff --git a/pkg/lint/rules/template.go b/pkg/lint/rules/template.go
index daeab4cfc..b4bfe33e2 100644
--- a/pkg/lint/rules/template.go
+++ b/pkg/lint/rules/template.go
@@ -146,6 +146,7 @@ func Templates(linter *support.Linter, values map[string]interface{}, namespace
 					linter.RunLinterRule(support.WarningSev, fpath, validateNoDeprecations(yamlStruct))
 
 					linter.RunLinterRule(support.ErrorSev, fpath, validateMatchSelector(yamlStruct, renderedContent))
+					linter.RunLinterRule(support.ErrorSev, fpath, validateListAnnotations(yamlStruct, renderedContent))
 				}
 			}
 		}
@@ -293,6 +294,28 @@ func validateMatchSelector(yamlStruct *K8sYamlStruct, manifest string) error {
 	}
 	return nil
 }
+func validateListAnnotations(yamlStruct *K8sYamlStruct, manifest string) error {
+	if yamlStruct.Kind == "List" {
+		m := struct {
+			Items []struct {
+				Metadata struct {
+					Annotations map[string]string
+				}
+			}
+		}{}
+
+		if err := yaml.Unmarshal([]byte(manifest), &m); err != nil {
+			return validateYamlContent(err)
+		}
+
+		for _, i := range m.Items {
+			if _, ok := i.Metadata.Annotations["helm.sh/resource-policy"]; ok {
+				return errors.New("Annotation 'helm.sh/resource-policy' within List objects are ignored")
+			}
+		}
+	}
+	return nil
+}
 
 // K8sYamlStruct stubs a Kubernetes YAML file.
 //


Test patch:
diff --git a/pkg/lint/rules/template_test.go b/pkg/lint/rules/template_test.go
index bc38445f8..f3aa641f2 100644
--- a/pkg/lint/rules/template_test.go
+++ b/pkg/lint/rules/template_test.go
@@ -424,3 +424,41 @@ func TestEmptyWithCommentsManifests(t *testing.T) {
 		t.Fatalf("Expected 0 lint errors, got %d", l)
 	}
 }
+func TestValidateListAnnotations(t *testing.T) {
+	md := &K8sYamlStruct{
+		APIVersion: "v1",
+		Kind:       "List",
+		Metadata: k8sYamlMetadata{
+			Name: "list",
+		},
+	}
+	manifest := `
+apiVersion: v1
+kind: List
+items:
+  - apiVersion: v1
+    kind: ConfigMap
+    metadata:
+      annotations:
+        helm.sh/resource-policy: keep
+`
+
+	if err := validateListAnnotations(md, manifest); err == nil {
+		t.Fatal("expected list with nested keep annotations to fail")
+	}
+
+	manifest = `
+apiVersion: v1
+kind: List
+metadata:
+  annotations:
+    helm.sh/resource-policy: keep
+items:
+  - apiVersion: v1
+    kind: ConfigMap
+`
+
+	if err := validateListAnnotations(md, manifest); err != nil {
+		t.Fatalf("List objects keep annotations should pass. got: %s", err)
+	}
+}
Repository: mvel/mvel
Pull request #374 (2024-11-04 13:16:53)

fix issue #355
When use asm optimizing,list get will throw error in some cases.This commit fixed it.


Patch:
diff --git a/src/main/java/org/mvel2/optimizers/impl/asm/ASMAccessorOptimizer.java b/src/main/java/org/mvel2/optimizers/impl/asm/ASMAccessorOptimizer.java
index d706035f..668ca5f1 100644
--- a/src/main/java/org/mvel2/optimizers/impl/asm/ASMAccessorOptimizer.java
+++ b/src/main/java/org/mvel2/optimizers/impl/asm/ASMAccessorOptimizer.java
@@ -1487,7 +1487,7 @@ private Object optimizeFieldMethodProperty(Object ctx, String property, Class<?>
       assert debug("CHECKCAST java/util/List");
       mv.visitTypeInsn(CHECKCAST, "java/util/List");
 
-      writeLiteralOrSubexpression(compiled, int.class);
+      writeLiteralOrSubexpression(compiled, int.class, Object.class);
 
       assert debug("INVOKEINTERFACE: java/util/List.get");
       mv.visitMethodInsn(INVOKEINTERFACE, "java/util/List", "get", "(I)Ljava/lang/Object;");


Test patch:
diff --git a/src/test/java/org/mvel2/tests/core/ASMConsistencyTest.java b/src/test/java/org/mvel2/tests/core/ASMConsistencyTest.java
index a08f12a6..4c9fc69f 100644
--- a/src/test/java/org/mvel2/tests/core/ASMConsistencyTest.java
+++ b/src/test/java/org/mvel2/tests/core/ASMConsistencyTest.java
@@ -11,6 +11,7 @@ import java.util.Vector;
 import org.mvel2.MVEL;
 import org.mvel2.optimizers.dynamic.DynamicOptimizer;
 import org.mvel2.util.MethodStub;
+import org.mvel2.integration.impl.CachingMapVariableResolverFactory;
 
 public class ASMConsistencyTest extends AbstractTest {
   public void testInSetRepeated() throws InterruptedException {
@@ -82,4 +83,20 @@ public class ASMConsistencyTest extends AbstractTest {
     DynamicOptimizer.tenuringThreshold = oldThreashold;
     DynamicOptimizer.timeSpan = oldTimeSpan;
   }
+  public void testListGet() {
+    Object expr = MVEL.compileExpression("import java.util.List;\n" +
+            "\n" +
+            "List aList = [];\n" +
+            "for (int index = 0; index < 96; index++) {\n" +
+            "\taList.add(index);\n" +
+            "}\n"
+            +
+            "\t\t\t\n" +
+            "for (int index = 0; index < aList.size(); index++) {\n" +
+            "\ta = aList[index];\n" +
+            "\tSystem.out.println(a);\n" +
+            "}\n"
+    );
+    MVEL.executeExpression(expr,new CachingMapVariableResolverFactory(new HashMap()));
+  }
 }
Repository: helm/helm
Pull request #6582 (2019-10-04 18:15:30)

Use same output format for hooks as for manifest
**What this PR does / why we need it**:
Use the same output format in `get hooks` as in `get manifest`.
Additionally it adds a missing line break before the yaml separator.

**Special notes for your reviewer**:
I didn't fix the hooks in the `get` output as this will be done in #6550 



Patch:
diff --git a/cmd/helm/get_hooks.go b/cmd/helm/get_hooks.go
index 4ec48bb2c..0c50c8833 100644
--- a/cmd/helm/get_hooks.go
+++ b/cmd/helm/get_hooks.go
@@ -46,7 +46,7 @@ func newGetHooksCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
 				return err
 			}
 			for _, hook := range res.Hooks {
-				fmt.Fprintf(out, "---\n# %s\n%s", hook.Name, hook.Manifest)
+				fmt.Fprintf(out, "---\n# Source: %s\n%s\n", hook.Path, hook.Manifest)
 			}
 			return nil
 		},


Test patch:
diff --git a/cmd/helm/testdata/output/get-hooks.txt b/cmd/helm/testdata/output/get-hooks.txt
index e8ba823d6..81e87b1f1 100644
--- a/cmd/helm/testdata/output/get-hooks.txt
+++ b/cmd/helm/testdata/output/get-hooks.txt
@@ -1,7 +1,8 @@
 ---
-# pre-install-hook
+# Source: pre-install-hook.yaml
 apiVersion: v1
 kind: Job
 metadata:
   annotations:
     "helm.sh/hook": pre-install
+
Repository: go-git/go-git
Pull request #1457 (2025-03-13 09:24:58)

Fix tests TestGetHaves and TestPushContext
Fixes two of the failing tests in the `v6-transport` branch.


Patch:
diff --git a/remote.go b/remote.go
index 87251bce..deb96518 100644
--- a/remote.go
+++ b/remote.go
@@ -830,8 +830,10 @@ func getHavesFromRef(
 
 	commit, err := object.GetCommit(s, h)
 	if err != nil {
-		// Ignore the error if this isn't a commit.
-		haves[ref.Hash()] = true
+		if !errors.Is(err, plumbing.ErrObjectNotFound) {
+			// Ignore the error if this isn't a commit.
+			haves[ref.Hash()] = true
+		}
 		return nil
 	}
 


Test patch:
diff --git a/remote_test.go b/remote_test.go
index 7847daa8..08743798 100644
--- a/remote_test.go
+++ b/remote_test.go
@@ -648,14 +648,14 @@ func (s *RemoteSuite) TestPushContext() {
 func eventually(s *RemoteSuite, condition func() bool) {
 	select {
 	case <-time.After(5 * time.Second):
+		s.Fail("failed to meet eventual condition")
 	default:
-		if condition() {
+		if v := condition(); v {
+			s.True(v)
 			break
 		}
 		time.Sleep(100 * time.Millisecond)
 	}
-
-	s.True(condition())
 }
 
 func (s *RemoteSuite) TestPushContextCanceled() {