Skip to content

Commit

Permalink
Add --no-show-signature to "git log --pretty=format:%ct -n1" call
Browse files Browse the repository at this point in the history
so the timestamp can be read correctly even if the user has set
log.showSignature to true in git config.

Closes: #1035321
  • Loading branch information
anthonyfok committed Mar 22, 2024
1 parent 994f003 commit 2406e5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func pkgVersionFromGit(gitdir string, u *upstream, forcePrerelease bool) (string
}

// Find committer date, UNIX timestamp
cmd = exec.Command("git", "log", "--pretty=format:%ct", "-n1")
cmd = exec.Command("git", "log", "--pretty=format:%ct", "-n1", "--no-show-signature")
cmd.Dir = gitdir
lastCommitUnixBytes, err := cmd.Output()
if err != nil {
Expand Down

0 comments on commit 2406e5c

Please sign in to comment.