[RFC PATCH v9 0/30] Add directory rename detection to git
- From
Elijah Newren <newren@gmail.com>
- Date
- Apr 13, 2018, 19:56 UTC
- Message-ID
- <20180413195607.18091-1-newren@gmail.com>
- In-Reply-To
- <xmqqmuya43cs.fsf@gitster-ct.c.googlers.com>
This series builds on commit febb3a86098f ("merge-recursive: avoid spurious rename/rename conflict from dir renames", 2018-02-14), also known as patch 29/30 of en/rename-directory-detection. That patch series has been reverted from master[1], due to a bug with patch 30/30, so does not apply to current master. But I didn't want to resend the whole series for an RFC.
These four patches replace that patch and: - fixes Linus' rewriting-of-unchanged-files bug[1] - fixes the problems that broke Junio's merges after my series[2] - fixes the problem the original patch 30/30 was intended to solve - adds lots of testcases to make sure this doesn't regress.
Linus' alternative of stupid-brute-force[3], would also work here, though I feel the first three patches are useful even if we take some form of his patch. Long term, the most correct solution would involve a rewrite to merge-recursive that would simplify this code[4], though I think the changes in this series brings this part of the code closer to that end state.
The big questions here are:
1) The last time my rename-directory-detection series was merged into
master it bit Junio badly. I'm planning to redo all merges of
git.git and linux.git and comparing v2.17.0 to what I get after
my changes. What else should I test?
2) What do folks thing about stupid-brute-force vs. the explanation in
my final patch?[1] https://public-inbox.org/git/CA+55aFzLZ3UkG5svqZwSnhNk75=fXJRkvU1m_RHBG54NOoaZPA@mail.gmail.com/ [2] https://public-inbox.org/git/xmqqmuya43cs.fsf@gitster-ct.c.googlers.com/ [3] https://public-inbox.org/git/CA+55aFwi9pTAJT_qtv=vHLgu=B1fdXBoD96i8Y5xnbS=zrfSzg@mail.gmail.com/ [4] https://public-inbox.org/git/xmqqd147kpdm.fsf@gitster.mtv.corp.google.com/
Elijah Newren (4):
merge-recursive: improve output precision around skipping updates
t6046: testcases checking whether updates can be skipped in a merge
merge-recursive: Fix was_tracked() to quit lying with some renamed
paths
merge-recursive: fix check for skipability of working tree updatesmerge-recursive.c | 109 +++++--- merge-recursive.h | 1 + t/t6022-merge-rename.sh | 2 +- t/t6043-merge-rename-directories.sh | 2 +- t/t6046-merge-skip-unneeded-updates.sh | 497 +++++++++++++++++++++++++++++++++ 5 files changed, 575 insertions(+), 36 deletions(-) create mode 100755 t/t6046-merge-skip-unneeded-updates.sh
-- 2.16.0.35.g6dd7ede834