aboutsummaryrefslogtreecommitdiffstats
path: root/entity
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2021-02-14 11:36:32 +0100
committerMichael Muré <batolettre@gmail.com>2021-02-14 12:19:50 +0100
commit3f6ef50883492f77995a7e27872d0b5ae17b9d6a (patch)
tree97677642f1b01c73c8c5a708ea0ec67ced8c402f /entity
parent99b9dd84cb4b0cfd3eb1fd50b07c8b826eb52d19 (diff)
downloadgit-bug-3f6ef50883492f77995a7e27872d0b5ae17b9d6a.tar.gz
bug: migrate to the DAG entity structure!
Diffstat (limited to 'entity')
-rw-r--r--entity/TODO9
-rw-r--r--entity/merge.go6
2 files changed, 4 insertions, 11 deletions
diff --git a/entity/TODO b/entity/TODO
deleted file mode 100644
index 9f33dd09..00000000
--- a/entity/TODO
+++ /dev/null
@@ -1,9 +0,0 @@
-- is the pack Lamport clock really useful vs only topological sort?
- - topological order is enforced on the clocks, so what's the point?
- - is EditTime equivalent to PackTime? no, avoid the gaps. Is it better?
- --> PackTime is contained within a bug and might avoid extreme reordering?
-- how to do commit signature?
-- how to avoid id collision between Operations?
-- write tests for actions
-- migrate Bug to the new structure
-- migrate Identity to the new structure? \ No newline at end of file
diff --git a/entity/merge.go b/entity/merge.go
index 1b68b4de..0661b7fc 100644
--- a/entity/merge.go
+++ b/entity/merge.go
@@ -42,13 +42,15 @@ func (mr MergeResult) String() string {
case MergeStatusNothing:
return "nothing to do"
case MergeStatusError:
- return fmt.Sprintf("merge error on %s: %s", mr.Id, mr.Err.Error())
+ if mr.Id != "" {
+ return fmt.Sprintf("merge error on %s: %s", mr.Id, mr.Err.Error())
+ }
+ return fmt.Sprintf("merge error: %s", mr.Err.Error())
default:
panic("unknown merge status")
}
}
-// TODO: Interface --> *Entity ?
func NewMergeNewStatus(id Id, entity Interface) MergeResult {
return MergeResult{
Id: id,