git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[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 updates
 merge-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
Previous: Junio C HamanoNext: Elijah Newren
Message 6 of 13 in “[Git] recursive merge on 'master' severely broken?”
  1. Junio C HamanoApr 11, 2018
  2. Junio C HamanoApr 11, 2018
  3. Junio C HamanoApr 11, 2018
  4. Elijah NewrenApr 11, 2018
  5. Junio C HamanoApr 12, 2018
  6. 0/30 Add directory rename detection to gitElijah Newren, Apr 13, 2018
  7. 30/30 merge-recursive: fix check for skipability of working tree updatesElijah Newren, Apr 13, 2018
  8. 75/30 merge-recursive: Fix was_tracked() to quit lying with some renamed pathsElijah Newren, Apr 13, 2018
  9. Junio C HamanoApr 16, 2018
  10. Elijah NewrenApr 16, 2018
  11. 50/30 t6046: testcases checking whether updates can be skipped in a mergeElijah Newren, Apr 13, 2018
  12. Stefan BellerApr 13, 2018
  13. 25/30 merge-recursive: improve output precision around skipping updatesElijah Newren, Apr 13, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.