{"thread":{"id":"35365","subject":"Bizarre git merge behaviour","startedAt":"2013-11-20T03:49:36Z","lastAt":"2013-11-21T06:37:12Z","messageCount":7,"participants":["Matthew Cengia","Johannes Sixt","Jakub Narębski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"230830","messageId":"l6hbgg$oej$1@ger.gmane.org","threadId":"35365","inReplyTo":null,"subject":"Bizarre git merge behaviour","fromName":"Matthew Cengia","fromEmail":"mattcen@gmail.com","sentAt":"2013-11-20T03:49:36Z","receivedAt":"2013-11-20T03:49:36Z","isPatch":false,"sender":{"key":"mattcen@gmail.com","avatar":"https://gravatar.com/avatar/4b0ef07b3df21906e69c4a91c5482463e8cb3f10a08a662686bd4e8915704adc?d=mp&s=160"},"body":"-----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA512\n\nThe other day I was merging a feature branch (shown below as\norigin/22869-new-kernel) into my staging release (shown below as 'wtf'),\nand it *reverted* a bucket-load of changes I'd made on other branches\nwhich had been merged into staging before. I can't for the life of me\nwork out why this happened, and would appreciate any ideas. Output below\nshows symptoms:\n\n\n  mattcen@sonar:prisonpc(wtf)$ git log --numstat --oneline origin/22869-new-kernel ^wtf | cat\n  a8879c2 Oops, name .config consistently with deb.\n  2797    0       client/kernel/config-3.5.7.20-1\n  0       2797    client/kernel/config-3.5.7.21-1\n  4c34686 Further lock down the inmate kernel.\n  366     1094    client/kernel/config-3.5.7.21-1\n  -       -       client/kernel/linux-firmware-image_3.5.7.21-1_i386.deb\n  -       -       client/kernel/linux-image-3.5.7.20_3.5.7.20-1_i386.deb\n  -       -       client/kernel/linux-image-3.5.7.21_3.5.7.21-1_i386.deb\n  6       7       client/scm/50-kernel-prisoner.scm\n  4a8acd0 Add build notes about how we generated these kernels.\n  37      0       client/kernel/README\n  e96adfe Merge remote-tracking branch 'origin/NNNNN-multicast-kernel' into 22869-new-kernel\n  4b8afeb Merge commit '8ef01f2' into 22869-new-kernel\n  fc4a5e6 Allow staff machines to receive IPTV stuff (per russm).\n  1       0       client/scm/50-staff.scm\n  117e646 Merge remote branch 'origin/staging' into NNNNN-multicast-kernel\n  deb3b38 allow IGMP reports out through iptables\n  1       0       client/scm/20-security.scm\n  8ef01f2 Enable multicast in inmate kernel.\n  0       3034    client/kernel/config-2.6.32.46+drm33.20\n  3036    0       client/kernel/config-2.6.32.61+drm33.26\n  -       -       client/kernel/linux-firmware-image_2.6.32.46+drm33.20-1_all.deb\n  -       -       client/kernel/linux-firmware-image_2.6.32.61+drm33.26-1_all.deb\n  -       -       client/kernel/linux-image-2.6.32.46+drm33.20_2.6.32.46+drm33.20-1_i386.deb\n  -       -       client/kernel/linux-image-2.6.32.61+drm33.26_2.6.32.61+drm33.26-1_i386.deb\n  11      11      client/scm/50-prisoner.scm\n  mattcen@sonar:prisonpc(wtf)$ git merge origin/22869-new-kernel\n  Auto-merging tca/parts.d/pxelinux-cfg\n  Auto-merging pre-install.sh\n  Removing ppcadm/templates/wwwfilter.tpl\n  Removing ppcadm/templates/streaming_media.tpl\n  Removing ppcadm/templates/disc_summary.tpl\n  Removing ppcadm/templates/disc_access.tpl\n  Auto-merging ppcadm/modules/quarantine.py\n  CONFLICT (content): Merge conflict in ppcadm/modules/quarantine.py\n  Auto-merging ppcadm/modules/media.py\n  CONFLICT (content): Merge conflict in ppcadm/modules/media.py\n  CONFLICT (modify/delete): ppcadm/modules/emailstats.py deleted in origin/22869-new-kernel and modified in HEAD. Version HEAD of ppcadm/modules/emailstats.py left in tree.\n  Removing generate-mail-stats\n  Removing doc/adminguide/images/streaming_media-screen.png\n  Auto-merging debian/rules\n  Auto-merging debian/prisonpc-internet.install\n  CONFLICT (content): Merge conflict in debian/prisonpc-internet.install\n  Auto-merging debian/prisonpc-core.cron.d\n  Auto-merging debian/NEWS\n  CONFLICT (content): Merge conflict in debian/NEWS\n  Auto-merging client/scm/50-kernel-prisoner.scm\n  CONFLICT (content): Merge conflict in client/scm/50-kernel-prisoner.scm\n  Removing client/kernel/linux-image-3.5.7.21_3.5.7.21-1_i386.deb\n  Removing client/kernel/linux-firmware-image_3.5.7.21-1_i386.deb\n  Auto-merging client/kernel/config-3.5.7.20-1\n  Resolved 'client/scm/50-kernel-prisoner.scm' using previous resolution.\n  Resolved 'debian/NEWS' using previous resolution.\n  Resolved 'debian/prisonpc-internet.install' using previous resolution.\n  Resolved 'ppcadm/modules/media.py' using previous resolution.\n  Resolved 'ppcadm/modules/quarantine.py' using previous resolution.\n  Automatic merge failed; fix conflicts and then commit the result.\n  mattcen@sonar:prisonpc(wtf)$ git status --porcelain\n  M  client/kernel/README\n  R  client/kernel/config-3.5.7.21-1 -> client/kernel/config-3.5.7.20-1\n  D  client/kernel/linux-firmware-image_3.5.7.21-1_i386.deb\n  A  client/kernel/linux-image-3.5.7.20_3.5.7.20-1_i386.deb\n  D  client/kernel/linux-image-3.5.7.21_3.5.7.21-1_i386.deb\n  M  client/scm/20-security.scm\n  M  client/scm/30-apps.scm\n  UU client/scm/50-kernel-prisoner.scm\n  M  client/scm/50-staff.scm\n  UU debian/NEWS\n  M  debian/changelog\n  M  debian/prisonpc-core.cron.d\n  UU debian/prisonpc-internet.install\n  M  debian/rules\n  A  doc/adminguide/images/streaming_media-screen.jpg\n  D  doc/adminguide/images/streaming_media-screen.png\n  M  doc/adminguide/images/web_filtering.png\n  M  doc/adminguide/streaming_media.rst\n  M  doc/adminguide/system-status.rst\n  M  doc/adminguide/web_filtering.rst\n  M  dovecot/dovecot-staff.conf\n  M  eric/apps/complain.py\n  M  eric/apps/links.py\n  M  eric/apps/media.py\n  M  eric/apps/whitelist.py\n  M  eric/eric\n  M  eric/eric_cfg.py\n  D  generate-mail-stats\n  M  ppcadm/modules/disc_access.py\n  UD ppcadm/modules/emailstats.py\n  UU ppcadm/modules/media.py\n  UU ppcadm/modules/quarantine.py\n  M  ppcadm/modules/wwwfilter.py\n  M  ppcadm/resources/admin.css\n  D  ppcadm/templates/disc_access.tpl\n  D  ppcadm/templates/disc_summary.tpl\n  M  ppcadm/templates/home.tpl\n  D  ppcadm/templates/streaming_media.tpl\n  M  ppcadm/templates/user.tpl\n  D  ppcadm/templates/wwwfilter.tpl\n  M  pre-install.sh\n  M  tca/parts.d/pxelinux-cfg\n  ?? old/\n  ?? paste\n  mattcen@sonar:prisonpc(wtf)$\n\n- -- \nRegards,\nMatthew Cengia\n-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.10 (GNU/Linux)\n\niQJ8BAEBCgBmBQJSjDFAXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w\nZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQwMjI1MjY2QUFCMThBOUQwNEMxOUQ0QjY3\nQTdFMzdGMzNCMjI3MkU4AAoJEHp+N/M7InLoJ5UP/0Ws9afdJjQ7h7qP/EQuOOcq\nzB/caURaNJbrqioZ/leaLTPKEeSLLL0p27Rooa+dt20qQU4Iq8I5K8tDPau5dh9z\nL6AnX1i5nS6Qikz6xqgBpfnnm8MYy/Bi9iW1o8k3lZrNuoVnmrqav/JxrygQLRFv\nHEtB5nGAOdsONtlFnGd7QrErf6d+bU5yCE1bN2CDwGYwghl/ApvCIMk16iRiguDA\nXmMGl3Y7agQHCOiy8ghCnDwq125BBKpIhLbV485YTTM+4SvbSAwfAWy9ja3KGYO/\nhmQeKmKTs3jgJhlV8qNFPCBVbuX6GgQCZeafd0aCK/taJY7AtFcn0aPQL7/d8cSc\n5mE0g7Cs2BAUEiN+whYaQbUPjLs5WX8ACqSpQY1eC+dQFVJcr5enQ65bsNqy0TXb\nvMmYzT5XHiMnkusdU3gC7D8yhOO0V4JYvPp+o7BEVqAKpwP4tuC3F8shsKXnIK1y\nm4aQDmQAVPBcC33FtgZNLlGR7XO5OC47xKfuCmBgxLhyiYb979HUZKm3vktKsDra\nghp6I/TV7i4kkETb9/h5U4mIoTXEtdA1fyvverE+6s4gMx6C+vn10GbB2z898cuT\n7OXYMONkcR+r8XtXm0/h5d64Zn82Xk/x52a/eHD6PgAvsfM3RwMiWAVVAKeRxrD9\nIvjRBri6se6aBkdL+z9v\n=sMCO\n-----END PGP SIGNATURE-----\n"},{"id":"230832","messageId":"528C62BE.7060803@viscovery.net","threadId":"35365","inReplyTo":"l6hbgg$oej$1@ger.gmane.org","subject":"Re: Bizarre git merge behaviour","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2013-11-20T07:20:30Z","receivedAt":"2013-11-20T07:20:30Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 11/20/2013 4:49, schrieb Matthew Cengia:\n> The other day I was merging a feature branch (shown below as\n> origin/22869-new-kernel) into my staging release (shown below as 'wtf'),\n> and it *reverted* a bucket-load of changes I'd made on other branches\n> which had been merged into staging before. I can't for the life of me\n> work out why this happened, and would appreciate any ideas. Output below\n> shows symptoms:\n\nNot really. It's impossible to tell what's wrong if you\n\n- show only ..topic\n- but not topic..\n- and you keep secret which of the changes is unexpected.\n\nPerhaps you did the following:\n\n- On one branch, you made a change A and then another change B that reverts A.\n- On the other branch, you also made the same changes as A, but there is\nno equivalent of B.\n\nIn this case, it is expected that the changes made by B (i.e. the reversal\nof change A) are *NOT* in the merge, i.e., the changes of A survive. It\nlooks as if the merge reverted change B.\n\nIf that is not the case, it could be helpful that you pick one of the\nfiles that contains an unexpected change and post the output of\n\ngit log --left-right --oneline wtf...origin/22869-new-kernel \\\n    file/with/changes | cut -c1-70\n\n-- Hannes\n"},{"id":"230837","messageId":"20131120120326.GD26413@debian.cengia.id.au","threadId":"35365","inReplyTo":"528C62BE.7060803@viscovery.net","subject":"Re: Bizarre git merge behaviour","fromName":"Matthew Cengia","fromEmail":"mattcen@gmail.com","sentAt":"2013-11-20T12:03:31Z","receivedAt":"2013-11-20T12:03:31Z","isPatch":false,"sender":{"key":"mattcen@gmail.com","avatar":"https://gravatar.com/avatar/4b0ef07b3df21906e69c4a91c5482463e8cb3f10a08a662686bd4e8915704adc?d=mp&s=160"},"body":"On 2013-11-20 08:20, Johannes Sixt wrote:\n[...]\n> Not really. It's impossible to tell what's wrong if you\n\nHi Hannes,\n\nThanks for your response, and sorry for providing insufficient\ninformation; this is a company Git repo (it's also about 200MB), so I've\ngot be careful what I post, but I can certainly give more than I've\nshown already.\n\n> \n> - show only ..topic\n> - but not topic..\n\nI won't show the same (git log) output as I did previously, because\nthere are lots of commits and is a bit difficult to read (but can do so\nas an attachment if you genuinely think it may be useful), but here's a\ndiff from wtf to merge-base:\n\nmattcen@sonar:prisonpc(wtf)$ git --no-pager diff --numstat --oneline \\\n    \"$(git merge-base wtf origin/22869-new-kernel)\" wtf\n1       1       .gitignore\n1       1       bios-monitoring/bios-alert\n4       4       bios-monitoring/check_bios.sh\n1       7       bios-monitoring/ppc-bios.conf\n3       0       client/scm/20-security.scm\n14      0       client/scm/30-apps.scm\n5       10      client/scm/30-branding.scm\n2       7       client/scm/30-password-reset.scm\n7       9       client/scm/50-kernel-prisoner.scm\n7       9       client/scm/50-kernel-staff.scm\n0       10      client/scm/50-prisoner.scm\n4       1       client/transmute\n2       1       client/transmute.scm.in\n0       1       config-files-internet.txt\n66      1       debian/NEWS\n24      0       debian/changelog\n6       3       debian/control\n0       13      debian/postinst-cfg.sh\n0       6       debian/prisonpc-core.config\n8       5       debian/prisonpc-core.cron.d\n12      6       debian/prisonpc-core.cron.daily\n2       1       debian/prisonpc-core.install\n35      94      debian/prisonpc-core.postinst\n25      0       debian/prisonpc-core.ppcadm-yuk.init\n0       4       debian/prisonpc-core.ppcadm.upstart\n14      0       debian/prisonpc-core.preinst\n27      0       debian/prisonpc-core.squid-yuk.init\n0       11      debian/prisonpc-core.templates\n16      2       debian/prisonpc-dev.cron.weekly\n6       6       debian/prisonpc-dev.install\n7       0       debian/prisonpc-dev.postinst\n1       0       debian/prisonpc-internet.cron.daily\n6       5       debian/prisonpc-internet.install\n4       19      debian/prisonpc-internet.postinst\n7       1       debian/rules\n11      10      disc/disc_access\n7       0       doc/Test_plan.txt\n11      0       doc/Vectors.txt\n-       -       doc/adminguide/images/streaming_media-screen.jpg\n-       -       doc/adminguide/images/streaming_media-screen.png\n-       -       doc/adminguide/images/web_filtering.png\n8       17      doc/adminguide/streaming_media.rst\n8       3       doc/adminguide/system-status.rst\n13      16      doc/adminguide/web_filtering.rst\n127     0       doc/current-mail-status.txt\n55      0       doc/prisonpc-mail-plan.dot\n90      0       doc/prisonpc-mail.dot\n2       0       doc/user_acceptance_tests/.gitignore\n22      0       doc/user_acceptance_tests/README\n581     0       doc/user_acceptance_tests/default.css\n1011    0       doc/user_acceptance_tests/user_acceptance_tests.rst\n2       2       dovecot/dovecot-staff.conf\n0       579     dovecot/email_quarantine\n8       5       eric/apps/complain.py\n5       3       eric/apps/links.py\n7       3       eric/apps/media.py\n5       3       eric/apps/whitelist.py\n4       0       eric/eric\n1       0       eric/eric_cfg.py\n48      0       generate-mail-stats\n12      2       post-install.sh\n10      0       postfix/alias-list\n2       0       postfix/by-week.procmailrc\n0       11      postfix/flush-queued-mail\n2       0       postfix/invariant.procmailrc\n49      67      postfix/main.cf.in\n3       36      postfix/master-basic.cf.in\n51      144     postfix/master-filter.cf.in\n145     156     postfix/maxwell\n0       15      postfix/maxwell.cfg.in\n31      0       postfix/maybe\n76      0       postfix/plainify\n0       0       postfix/plainify.d/cur/00-nothing\n6       0       postfix/plainify.d/cur/01-nonmime\n12      0       postfix/plainify.d/cur/02-th\n8       0       postfix/plainify.d/cur/02-tp\n35761   0       postfix/plainify.d/cur/f0-many-types\n832     0       postfix/plainify.d/cur/f0-rfc822\n244     0       postfix/plainify.d/cur/f0-th_tbird_cascade\n0       167     postfix/smtp_archiver\n0       240     postfix/strip_quarantine_markers\n119     248     postfix/whitelist\n85      37      ppcadm/modules/disc_access.py\n80      0       ppcadm/modules/emailstats.py\n8       7       ppcadm/modules/mailfilter.py\n130     49      ppcadm/modules/media.py\n58      74      ppcadm/modules/quarantine.py\n87      37      ppcadm/modules/wwwfilter.py\n3       0       ppcadm/resources/admin.css\n31      0       ppcadm/templates/disc_access.tpl\n5       0       ppcadm/templates/disc_summary.tpl\n7       6       ppcadm/templates/home.tpl\n2       2       ppcadm/templates/mailfilter_menu.tpl\n1       2       ppcadm/templates/quarantine_list.tpl\n33      17      ppcadm/templates/quarantine_mail.tpl\n67      0       ppcadm/templates/streaming_media.tpl\n3       3       ppcadm/templates/user.tpl\n100     0       ppcadm/templates/wwwfilter.tpl\n36      27      pre-install.sh\n17      21      squid/check_greylist\n2       1       squid/make_url_regex\n8       34      squid/remove_user.sh\n8       24      squid/update_user.sh\n7       16      squid/validate_url_comment\n2       1       streaming-media/autodvdencode\n2       1       streaming-media/m3u-slurp\n4       4       streaming-media/media-stream\n2       1       streaming-media/vobcopy_wrapper\n2       1       switch/switch-cmd\n23      1       tca/parts.d/pxelinux-cfg\n14      6       tca/rebuild_prisoner_realm_access\n7       4       tca/rebuild_prisoner_realm_service_access\n48      147     tca/tca.pm\n18      10      tca/tca_realm_access\n6       5       tca/tca_realm_service_access\n0       9       trimserver/trimserver.cfg.in\n14      43      trimserver/trimserver.pm\n0       42      webmin/rcs_ci\n6       0       webmin/reset_user_desktop_config\n10      49      webmin/sort_ci\n1       4       webmin/sort_ci.8\n0       12      webmin/sort_ci_correct\n11      14      webmin/whitelist_update\n\n> - and you keep secret which of the changes is unexpected.\n\nThe only changes I expect are these:\n\nmattcen@sonar:prisonpc(wtf)$ git --no-pager diff --numstat --oneline \\\n    \"$(git merge-base wtf origin/22869-new-kernel)\" origin/22869-new-kernel\n37      0       client/kernel/README\n2797    0       client/kernel/config-3.5.7.20-1\n0       3525    client/kernel/config-3.5.7.21-1\n-       -       client/kernel/linux-firmware-image_3.5.7.21-1_i386.deb\n-       -       client/kernel/linux-image-3.5.7.20_3.5.7.20-1_i386.deb\n-       -       client/kernel/linux-image-3.5.7.21_3.5.7.21-1_i386.deb\n1       0       client/scm/20-security.scm\n6       7       client/scm/50-kernel-prisoner.scm\n1       0       client/scm/50-staff.scm\n22      0       doc/user_acceptance_tests/README\n581     0       doc/user_acceptance_tests/default.css\n1548    0       doc/user_acceptance_tests/user_acceptance_tests.html\n4268    0       doc/user_acceptance_tests/user_acceptance_tests.pdf\n940     0       doc/user_acceptance_tests/user_acceptance_tests.rst\n\n> Perhaps you did the following:\n> \n> - On one branch, you made a change A and then another change B that reverts A.\n> - On the other branch, you also made the same changes as A, but there is\n> no equivalent of B.\n> \n> In this case, it is expected that the changes made by B (i.e. the reversal\n> of change A) are *NOT* in the merge, i.e., the changes of A survive. It\n> looks as if the merge reverted change B.\n\nI have found no evidence that this happened, but am not confident enough\nto rule it out.\n\n> \n> If that is not the case, it could be helpful that you pick one of the\n> files that contains an unexpected change and post the output of\n> \n> git log --left-right --oneline wtf...origin/22869-new-kernel \\\n>     file/with/changes | cut -c1-70\n\nSure. I don't expect the merge to cause any changes to quarantine.py:\n\nmattcen@sonar:prisonpc(wtf)$ git log --left-right --oneline \\\n    wtf...origin/22869-new-kernel ppcadm/modules/quarantine.py | cut -c1-70\n< 5b5f552 Fixed msg vs msg.as_string because smtp.sendmail is picky\n< 03618f2 Use Return-Path, not X-Original-Envelope-From.\n< dc1169e Bug squashing.\n< 8e20216 Changed quarantine module to run maybe and send directly to\n< d79ad42 Change final port, name the magic number.\n< e44d1b3 Merge remote-tracking branch 'origin/staging' into 22912-ppc\n< a03db6d Modified quarantine UI to handle the new reports format\n\nFurther, there are other files that don't change at all on either side\nof the symetric diff:\n\nmattcen@sonar:prisonpc(wtf)$ git log -M -C  --left-right --oneline \\\n    wtf...origin/22869-new-kernel generate-mail-stats | cut -c1-70\n<no output>\n\nI'm truly stumped. It's also worth noting that I've gone through and\nmanually resolved this merge one file at a time, and I'm about 90% sure\nI ended up with the correct result, but it'd be nice to have had the\nmerge do the right thing in the first place, and I obviously want to\navoid having to do this again in a few months' time.\n\n-- \nRegards,\nMatthew Cengia\n"},{"id":"230839","messageId":"528CAB40.8030107@viscovery.net","threadId":"35365","inReplyTo":"20131120120326.GD26413@debian.cengia.id.au","subject":"Re: Bizarre git merge behaviour","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2013-11-20T12:29:52Z","receivedAt":"2013-11-20T12:29:52Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 11/20/2013 13:03, schrieb Matthew Cengia:\n> The only changes I expect are these:\n> \n> mattcen@sonar:prisonpc(wtf)$ git --no-pager diff --numstat --oneline\n> \\ \"$(git merge-base wtf origin/22869-new-kernel)\"\n> origin/22869-new-kernel 37      0       client/kernel/README 2797\n> 0       client/kernel/config-3.5.7.20-1 0       3525\n> client/kernel/config-3.5.7.21-1 -       -\n> client/kernel/linux-firmware-image_3.5.7.21-1_i386.deb -       -\n> client/kernel/linux-image-3.5.7.20_3.5.7.20-1_i386.deb -       -\n> client/kernel/linux-image-3.5.7.21_3.5.7.21-1_i386.deb 1       0\n> client/scm/20-security.scm 6       7\n> client/scm/50-kernel-prisoner.scm 1       0\n> client/scm/50-staff.scm 22      0\n> doc/user_acceptance_tests/README 581     0\n> doc/user_acceptance_tests/default.css 1548    0\n> doc/user_acceptance_tests/user_acceptance_tests.html 4268    0\n> doc/user_acceptance_tests/user_acceptance_tests.pdf 940     0\n> doc/user_acceptance_tests/user_acceptance_tests.rst\n\n> mattcen@sonar:prisonpc(wtf)$ git log --left-right --oneline \\ \n> wtf...origin/22869-new-kernel ppcadm/modules/quarantine.py | cut\n> -c1-70 < 5b5f552 Fixed msg vs msg.as_string because smtp.sendmail is\n> picky < 03618f2 Use Return-Path, not X-Original-Envelope-From. <\n> dc1169e Bug squashing. < 8e20216 Changed quarantine module to run\n> maybe and send directly to < d79ad42 Change final port, name the\n> magic number. < e44d1b3 Merge remote-tracking branch 'origin/staging'\n> into 22912-ppc < a03db6d Modified quarantine UI to handle the new\n> reports format\n\nSo, ppcadm/modules/quarantine.py changed only on our side, but not on\ntheir side. This is in accordance with your listing above. Nevertheless,\nthe file is marked conflicted in your git status --porcelain output in\nthe original post:\n\nUU ppcadm/modules/quarantine.py\n\nThat's strange. I can't tell what is going on. Perhaps you have some\ncriss-cross merges in your history that merge-recursive trips over?\n\nSorry, I don't know how to help you further.\n\n-- Hannes\n"},{"id":"230840","messageId":"20131120123320.GF26413@debian.cengia.id.au","threadId":"35365","inReplyTo":"528CAB40.8030107@viscovery.net","subject":"Re: Bizarre git merge behaviour","fromName":"Matthew Cengia","fromEmail":"mattcen@gmail.com","sentAt":"2013-11-20T12:33:21Z","receivedAt":"2013-11-20T12:33:21Z","isPatch":false,"sender":{"key":"mattcen@gmail.com","avatar":"https://gravatar.com/avatar/4b0ef07b3df21906e69c4a91c5482463e8cb3f10a08a662686bd4e8915704adc?d=mp&s=160"},"body":"On 2013-11-20 13:29, Johannes Sixt wrote:\n[...]\n> That's strange. I can't tell what is going on. Perhaps you have some\n> criss-cross merges in your history that merge-recursive trips over?\n\nThat's as good a guess as any, but I suspect tracking it down may\ninvolve needles and haystacks...\n\n> \n> Sorry, I don't know how to help you further.\n\nNo worries, thanks very much for your help so far nonetheless.\n\n-- \nRegards,\nMatthew Cengia\n"},{"id":"230845","messageId":"528CD671.7090702@gmail.com","threadId":"35365","inReplyTo":"20131120120326.GD26413@debian.cengia.id.au","subject":"Re: Bizarre git merge behaviour","fromName":"Jakub Narębski","fromEmail":"jnareb@gmail.com","sentAt":"2013-11-20T15:34:09Z","receivedAt":"2013-11-20T15:34:09Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"W dniu 2013-11-20 13:03, Matthew Cengia pisze:\n> On 2013-11-20 08:20, Johannes Sixt wrote:\n> [...]\n>> Not really. It's impossible to tell what's wrong if you\n>\n> Hi Hannes,\n>\n> Thanks for your response, and sorry for providing insufficient\n> information; this is a company Git repo (it's also about 200MB), so I've\n> got be careful what I post, but I can certainly give more than I've\n> shown already.\n\nI think there is some anonymizing tool for git, which replaces data\n(blobs contents and file names) with artificial names, while preserving\nhistory.  It was intended to help debug repos with proprietary data...\nbut unfortunately I have not bookmarked it (or lost bookmark).\n\n[...]\n> I'm truly stumped. It's also worth noting that I've gone through and\n> manually resolved this merge one file at a time, and I'm about 90% sure\n> I ended up with the correct result, but it'd be nice to have had the\n> merge do the right thing in the first place, and I obviously want to\n> avoid having to do this again in a few months' time.\n\nWell, there is git-rerere (reuse recorded resolutions) which records \nfile-level (textual) merge resolutions and tries to reapply if \nappropriate when merging.\n\nPerhaps git-imerge tool would be of help in complicated merges?\n\n-- \nJakub Narębski\n"},{"id":"230873","messageId":"20131121063710.GH26413@debian.cengia.id.au","threadId":"35365","inReplyTo":"528CAB40.8030107@viscovery.net","subject":"Re: Bizarre git merge behaviour","fromName":"Matthew Cengia","fromEmail":"mattcen@gmail.com","sentAt":"2013-11-21T06:37:12Z","receivedAt":"2013-11-21T06:37:12Z","isPatch":false,"sender":{"key":"mattcen@gmail.com","avatar":"https://gravatar.com/avatar/4b0ef07b3df21906e69c4a91c5482463e8cb3f10a08a662686bd4e8915704adc?d=mp&s=160"},"body":"On 2013-11-20 13:29, Johannes Sixt wrote:\n[...]\n> UU ppcadm/modules/quarantine.py\n> \n> That's strange. I can't tell what is going on. Perhaps you have some\n> criss-cross merges in your history that merge-recursive trips over?\n> \n> Sorry, I don't know how to help you further.\n\nHah! I worked it out!\n\n$coworker erroneously did a \"git merge -s ours\" into the branch I was\nmerging in, and it undid more changes than he intended, which is what\nresulted in *everything* breaking for me.\n\nI've appropriately chastised him and most importantly understand why the\nproblem occured, which puts my mind at ease.\n\nThanks again for all your help.\n\n-- \nRegards,\nMatthew Cengia\n"}]}