aboutsummaryrefslogtreecommitdiffstats
path: root/bug/operation.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2019-03-28 01:21:41 +0100
committerMichael Muré <batolettre@gmail.com>2019-03-28 01:21:41 +0100
commit0a71e6d269e60f844a2d08069ca5bdee9b91b388 (patch)
tree25afa74bdf5e3a394a398b5996fb0554306429d4 /bug/operation.go
parent029861fa0ee99845dfdc3c0e38748608109233ed (diff)
downloadgit-bug-0a71e6d269e60f844a2d08069ca5bdee9b91b388.tar.gz
commands: display comment's id in "git bug comment"
Diffstat (limited to 'bug/operation.go')
-rw-r--r--bug/operation.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/bug/operation.go b/bug/operation.go
index cc5b0007..8e77eed8 100644
--- a/bug/operation.go
+++ b/bug/operation.go
@@ -60,6 +60,9 @@ func hashRaw(data []byte) git.Hash {
// hash compute the hash of the serialized operation
func hashOperation(op Operation) (git.Hash, error) {
+ // TODO: this might not be the best idea: if a single bit change in the output of json.Marshal, this will break.
+ // Idea: hash the segment of serialized data (= immutable) instead of the go object in memory
+
base := op.base()
if base.hash != "" {