Summary: Reuse the function `get_child_ptr_base_offset`, which returns the offset to the first child entry. Also simplify `get_child_ptr_base_offset` with @wez's suggestions.
Test Plan: pass all unit tests
Reviewers: lcharignon, wez
Reviewed By: wez
Subscribers: mitrandir, mjpieters, wez
Differential Revision: https://phabricator.intern.facebook.com/D3260566
Signature: t1:3260566:1462423991:565f9ea8100d1392d7fcb3e108823208836fe0fe
Summary:
We're adding the name size twice. #fail
I can't believe I'm discovering bugs like this at this point.
Test Plan: pass unit tests.
Reviewers: lcharignon, wez
Reviewed By: wez
Subscribers: mitrandir, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3255048
Signature: t1:3255048:1462320786:0e2fceeb57bbd49e6bfc2191b2a691ba4ed7d526
Summary:
gcc is stricter about uninitialized variables. these variables will never be read in these code paths, but gcc is freaking out about them.
i don't know if clang is just smarter about tracing how variables are used across function boundaries or if clang is not properly warning on uninitialized variables.
anyhow, I know these are not used because valgrind would have caught the improper usage.
Test Plan: make local w/ gcc
Reviewers: wez, lcharignon
Reviewed By: lcharignon
Subscribers: mitrandir, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3236365
Signature: t1:3236365:1461879525:50c15b9b3970f29cd318e8d0c71482b9ed5e22db
Summary:
`setup.py` turns on a couple extra warnings, so add them to our list and resolve them. Most of them are 64->32 bit conversions. In most cases, we test and abort if we're outside the 32-bit range.
I also removed const from `contains_path` because enforcing it means code duplicating, which is never a great thing.
Test Plan: pass unit tests
Reviewers: #sourcecontrol, rmcelroy
Reviewed By: rmcelroy
Subscribers: mitrandir, mjpieters
Differential Revision: https://phabricator.fb.com/D3194045
Tasks: 10652171
Signature: t1:3194045:1461605953:1a7012fbc75ca8808130c8ad00ed4b2e8fa96f91
Summary: It doesn't copy the checksum_sz and flags fields over. This is a serious problem as they are used in checksum calculation.
Test Plan: wrote unit test to verify the metadata is copied over. failed. updated code to copy the metadata over. tests pass!
Reviewers: #sourcecontrol, rmcelroy
Reviewed By: rmcelroy
Subscribers: rmcelroy, mitrandir, mjpieters
Differential Revision: https://phabricator.fb.com/D3155393
Tasks: 10644245
Signature: t1:3155393:1460136520:10d75c5181eda88139df26d57a560af95f8ed69d
Summary: 0 is actually a legit index, so if someone checks that instead of the node pointer, then we might find the wrong thing.
Test Plan: pass unit tests.
Reviewers: #sourcecontrol, mitrandir
Reviewed By: mitrandir
Subscribers: mitrandir, mjpieters
Differential Revision: https://phabricator.fb.com/D3130262
Signature: t1:3130262:1459557188:661eae1363bf603a77e1d17960db0a5f8f33834b
Summary: On remove_path, we need to remove the implicit nodes that are empty after we remove the leaf node. Actually typing the nodes differently makes this easier.
Test Plan: pass unit tests.
Reviewers: #sourcecontrol, lcharignon
Reviewed By: lcharignon
Subscribers: mitrandir, mjpieters
Differential Revision: https://phabricator.fb.com/D3128497
Signature: t1:3128497:1459811588:d3132edc7044061263457c7d0b5ee072b67204c9
Summary:
Still missing:
== Code and tests: ==
* remove path
* contains path (but this is essentially the same as get path)
* read/write from file
== Tests: ==
* checksumming directories
Test Plan: well, it kind of builds.
Reviewers: durham, simpkins, lcharignon
Reviewed By: lcharignon
Subscribers: net-systems-diffs@, mitrandir, mjpieters, akushner, rmcelroy
Differential Revision: https://phabricator.fb.com/D3120166
Signature: t1:3120166:1459464981:60f19dd1e36d62776a69fa88c018122a4be27d87