diff --git a/bug/bug.go b/bug/bug.go index 3af4337e0db5eadec29a2b8990b8885976140d4c..203d5a1ac744f0ba44c357fbfa1e77d3dbce822a 100644 --- a/bug/bug.go +++ b/bug/bug.go @@ -576,8 +576,12 @@ func (bug *Bug) Id() string { // HumanId return the Bug identifier truncated for human consumption func (bug *Bug) HumanId() string { + return FormatHumanID(bug.Id()) +} + +func FormatHumanID(id string) string { format := fmt.Sprintf("%%.%ds", humanIdLength) - return fmt.Sprintf(format, bug.Id()) + return fmt.Sprintf(format, id) } // CreateLamportTime return the Lamport time of creation diff --git a/commands/pull.go b/commands/pull.go index 64dd83fed2a785ae6f3bdea651d746d09100626f..73a27d3d92553b99615e5ac6ab1ad9d18861733e 100644 --- a/commands/pull.go +++ b/commands/pull.go @@ -42,7 +42,7 @@ func runPull(cmd *cobra.Command, args []string) error { } if merge.Status != bug.MergeStatusNothing { - fmt.Printf("%s: %s\n", merge.Bug.HumanId(), merge) + fmt.Printf("%s: %s\n", bug.FormatHumanID(merge.Id), merge) } }