From 0a71e6d269e60f844a2d08069ca5bdee9b91b388 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Thu, 28 Mar 2019 01:21:41 +0100 Subject: commands: display comment's id in "git bug comment" --- bug/operation.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bug/operation.go') 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 != "" { -- cgit