git-commit-vandalism/Documentation/technical
Elijah Newren bb80333c08 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>
2021-05-20 15:40:39 +09:00
..
.gitignore
api-error-handling.txt
api-index-skel.txt
api-index.sh
api-merge.txt
api-parse-options.txt strvec: update documention to avoid argv_array 2020-07-28 15:02:18 -07:00
api-trace2.txt usage: add trace2 entry upon warning() 2020-11-24 17:39:38 -08:00
bitmap-format.txt
bundle-format.txt bundle: add new version for use with SHA-256 2020-07-30 09:16:48 -07:00
commit-graph-format.txt Merge branch 'tb/bloom-improvements' 2020-09-29 14:01:20 -07:00
commit-graph.txt docs: commit-graph: fix some whitespace in the diagram 2020-08-13 11:06:04 -07:00
directory-rename-detection.txt t6423: more involved rules for renaming directories into each other 2020-10-16 12:29:28 -07:00
hash-function-transition.txt docs: fix step in transition plan 2020-08-13 18:09:55 -07:00
http-protocol.txt http-protocol.txt: document SHA-256 "want"/"have" format 2020-08-17 10:35:12 -07:00
index-format.txt index-format: discuss recursion of cache-tree better 2021-01-15 23:04:59 -08:00
long-running-process-protocol.txt
multi-pack-index.txt Merge branch 'jb/midx-doc-update' 2020-12-17 15:06:41 -08:00
pack-format.txt pack-format.txt: document sizes at start of delta data 2021-01-04 13:00:28 -08:00
pack-heuristics.txt
pack-protocol.txt Merge branch 'jx/proc-receive-hook' 2020-09-25 15:25:39 -07:00
packfile-uri.txt Doc: clarify contents of packfile sent as URI 2021-01-20 19:06:50 -08:00
partial-clone.txt promisor-remote: lazy-fetch objects in subprocess 2020-08-18 16:46:53 -07:00
protocol-capabilities.txt docs: new capability to advertise session IDs 2020-11-11 18:26:52 -08:00
protocol-common.txt
protocol-v2.txt docs: new capability to advertise session IDs 2020-11-11 18:26:52 -08:00
racy-git.txt
reftable.txt doc: fix some typos 2021-01-04 11:27:48 -08:00
remembering-renames.txt Documentation/technical: describe remembering renames optimization 2021-05-20 15:40:39 +09:00
repository-version.txt
rerere.txt
send-pack-pipeline.txt
shallow.txt shallow.txt: document SHA-256 shallow format 2020-08-17 10:35:13 -07:00
signature-format.txt
trivial-merge.txt