MCPcopy
hub / github.com/kptdev/kpt / GitPatchUpdater

Struct GitPatchUpdater

internal/util/update/gitpatch.go:34–48  ·  view source on GitHub ↗

Updater updates a package to a new upstream version. If the package at pkgPath differs from the upstream ref it was fetch from, then Update will attempt to create a patch from the upstream source version and upstream update version.

Source from the content-addressed store, hash-verified

32// If the package at pkgPath differs from the upstream ref it was fetch from, then Update will
33// attempt to create a patch from the upstream source version and upstream update version.
34type GitPatchUpdater struct {
35 UpdateOptions
36
37 // patch is a patch which can be applied with 'git am'
38 patch string
39
40 // toCommit is resolved commit for toRef
41 toCommit string
42
43 // gitRunner is used to run git commands
44 gitRunner *gitutil.GitRunner
45
46 // packageRef is the RemoteDirectory/ToRef -- for sub directory versioning
47 packageRef string
48}
49
50func (u GitPatchUpdater) Update(options UpdateOptions) error {
51 u.UpdateOptions = options

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected