diff options
author | Michael Muré <batolettre@gmail.com> | 2018-09-19 21:45:04 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2018-09-19 21:45:52 +0200 |
commit | d57e2fdd1977b9a5d4984d7146e66349001893b3 (patch) | |
tree | bc58dcabc197929894c3d88ec2af56385b80e9de /bug/bug.go | |
parent | 1060acfd533c30ddcd31e4c0431d36e410e011e9 (diff) | |
download | git-bug-d57e2fdd1977b9a5d4984d7146e66349001893b3.tar.gz |
commands: fix a panic on merge invalid
Diffstat (limited to 'bug/bug.go')
-rw-r--r-- | bug/bug.go | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 |