Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
55f9e24e
Commit
55f9e24e
authored
Jun 19, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
cf37f71d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
wcfs/δbtail.go
wcfs/δbtail.go
+12
-2
No files found.
wcfs/δbtail.go
View file @
55f9e24e
...
...
@@ -436,7 +436,7 @@ func diffT(ctx context.Context, a, b *Tree, δZTC SetOid) (δ map[Key]Value, err
defer
xerr
.
Contextf
(
&
err
,
"diffT %s %s"
,
xidOf
(
a
),
xidOf
(
b
))
if
(
a
!=
nil
&&
b
!=
nil
)
&&
(
a
.
POid
()
!=
b
.
POid
())
{
panic
(
"different trees"
)
panic
(
"different trees"
)
// XXX wrong - tree object can be changed completely
}
var
av
[]
TreeEntry
...
...
@@ -474,6 +474,7 @@ func diffT(ctx context.Context, a, b *Tree, δZTC SetOid) (δ map[Key]Value, err
for
child
:=
range
allChildren
{
// XXX -> sorted?
// add/del/modify, but child is not tracked - ignore
// XXX correct only in children from a? (b could have changed childeren to new objects)
if
!
δZTC
.
Has
(
child
)
{
continue
}
...
...
@@ -502,6 +503,15 @@ func diffT(ctx context.Context, a, b *Tree, δZTC SetOid) (δ map[Key]Value, err
}
}
// merge Tkdel <- δc
for
k
,
v
:=
range
δc
{
if
v
==
VDEL
{
Tkdel
.
Add
(
k
)
}
else
{
delete
(
Tkdel
,
k
)
}
}
// XXX process keys from δ outside of already tracked nodes
// XXX only deleted keys - no - delete can be from untracked
// node and on tracked it is seen as addition
...
...
@@ -517,7 +527,7 @@ func diffB(ctx context.Context, a, b *Bucket) (δ map[Key]Value, err error) {
defer
xerr
.
Contextf
(
&
err
,
"diffB %s %s"
,
xidOf
(
a
),
xidOf
(
b
))
// XXX oid can be InvalidOid for T/B... (i.e. B is part of T and is not yet committed separately)
if
(
a
!=
nil
&&
b
!=
nil
)
&&
(
a
.
POid
()
!=
b
.
POid
())
{
panic
(
"different buckets"
)
panic
(
"different buckets"
)
// XXX wrong - bucket object can be changed completely
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment