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

Re: git merge -s subtree seems to be broken.

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 31, 2018, 17:17 UTC
Message-ID
<xmqqh8kfcokk.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20180731161559.GB16910@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 7 quoted lines
> +...
> +		} else if (cmp > 0) {
>  			/* path2 does not appear in one */
> +			score += score_missing(two.entry.mode, two.entry.path);
> +			update_tree_entry(&two);
> +			continue;
> +		} if (oidcmp(one.entry.oid, two.entry.oid)) {

As the earlier ones do the "continue at the end of the block", this does not affect the correctness, but I think you either meant "else if" or a fresh "if/else" that is disconnected from the previous if/else if/... chain.

Show 5 quoted lines
>  			/* they are different */
> ...
> +			score += score_differs(one.entry.mode, two.entry.mode,
> +					       one.entry.path);
> +		} else {
Previous: Jeff KingNext: Jeff King
Message 9 of 17 in “git merge -s subtree seems to be broken.”
  1. George ShammasJul 31, 2018
  2. George ShammasJul 31, 2018
  3. Jeff KingJul 31, 2018
  4. Junio C HamanoJul 31, 2018
  5. René ScharfeAug 1, 2018
  6. Junio C HamanoJul 31, 2018
  7. George ShammasJul 31, 2018
  8. Jeff KingJul 31, 2018
  9. Junio C HamanoJul 31, 2018
  10. Jeff KingJul 31, 2018
  11. Jeff KingJul 31, 2018
  12. George ShammasJul 31, 2018
  13. Jeff KingJul 31, 2018
  14. Junio C HamanoJul 31, 2018
  15. René ScharfeAug 1, 2018
  16. Jeff KingAug 2, 2018
  17. Jeff KingAug 2, 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.