Browse Source

truncate the versoin hash after 9 characters, use -dirty suffix

pull/1381/head
Marten Seemann 3 years ago
parent
commit
826090864f
  1. 5
      p2p/protocol/identify/id_go118.go

5
p2p/protocol/identify/id_go118.go

@ -30,6 +30,9 @@ func init() {
switch bs.Key {
case "vcs.revision":
revision = bs.Value
if len(revision) > 9 {
revision = revision[:9]
}
case "vcs.modified":
if bs.Value == "true" {
dirty = true
@ -38,6 +41,6 @@ func init() {
}
defaultUserAgent = fmt.Sprintf("%s@%s", bi.Main.Path, revision)
if dirty {
defaultUserAgent += " (dirty)"
defaultUserAgent += "-dirty"
}
}

Loading…
Cancel
Save