summaryrefslogtreecommitdiff
path: root/Documentation/git-hash-object.txt
diff options
context:
space:
mode:
authorLibravatar Elijah Newren <newren@gmail.com>2021-05-20 06:09:30 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-05-20 15:40:39 +0900
commitbb80333c0853b04ff789de8037bef5a4ade1da8c (patch)
tree245bd1873182bb57afaa2ee30be4fdf7650f39b6 /Documentation/git-hash-object.txt
parentt6423: rename file within directory that other side renamed (diff)
downloadtgif-bb80333c0853b04ff789de8037bef5a4ade1da8c.tar.xz
Documentation/technical: describe remembering renames optimization
Remembering renames on the upstream side of history in an early merge of a rebase or cherry-pick for re-use in a latter merge of the same operation makes pretty good intuitive sense. However, trying to show that it doesn't cause some subtle behavioral difference or some funny edge or corner case is much more involved. And, in fact, it does introduce a subtle behavioral change. Document all the assumptions, special cases, and logic involved in such an optimization, and describe why this optimization is safe under the current optimizations/features/etc. -- even when the subtle behavioral change is triggered. Part of the point of adding this document that goes over the optimization in such laborious detail, is that it is possible that significant future changes (optimizations or feature changes) could interact with this optimization in interesting ways; this document is here to help folks making big changes sanity check that the assumptions and arguments underlying this optimization are still valid. (As a side note, creating this document forced me to review things in sufficient detail that I found I was not properly caching directory-rename-induced renames, resulting in the code not being aware of those renames and causing unnecessary diffcore_rename_extended() calls in subsequent merges.) A subsequent commit will add several testcases based on this document meant to stress-test the implementation and also document the case with the subtle behavioral change. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-hash-object.txt')
0 files changed, 0 insertions, 0 deletions