Skip to content

Commit

Permalink
Correctly detect primary branch
Browse files Browse the repository at this point in the history
Signed-off-by: Andrii Kostenko <[email protected]>
  • Loading branch information
gugu committed Jan 19, 2024
1 parent 7d93c7a commit ce1fe93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/git/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func (m *nativeGitClient) Add(path string) error {

// SymRefToBranch retrieves the branch name a symbolic ref points to
func (m *nativeGitClient) SymRefToBranch(symRef string) (string, error) {
output, err := m.runCmd("symbolic-ref", symRef)
output, err := m.runCmd("symbolic-ref", "refs/remotes/origin/" + symRef)

Check failure on line 96 in ext/git/writer.go

View workflow job for this annotation

GitHub Actions / Ensure code is correctly linted

File is not `goimports`-ed with -local github.com/argoproj-labs/argocd-image-updater (goimports)
if err != nil {
return "", fmt.Errorf("could not resolve symbolic ref '%s': %v", symRef, err)
}
Expand Down

0 comments on commit ce1fe93

Please sign in to comment.