{"thread":{"id":"39986","subject":"Rebase bug","startedAt":"2015-07-31T21:26:26Z","lastAt":"2015-07-31T21:44:46Z","messageCount":2,"participants":["alan@clueserver.org"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"267227","messageId":"14fe2a0c9b92fc27d3ab5b2083cb16b2.squirrel@clueserver.org","threadId":"39986","inReplyTo":null,"subject":"Rebase bug","fromName":"","fromEmail":"alan@clueserver.org","sentAt":"2015-07-31T21:26:26Z","receivedAt":"2015-07-31T21:26:26Z","isPatch":false,"sender":{"key":"alan@clueserver.org","avatar":null},"body":"I think I have identified an obscure bug. I have a reproducible test case.\nI am trying to come up with enough of a test case that can be used for\nfinding and fixing the issue.\n\nI have a set of patches. They are diffs. Some have whitespace issues.\n(Which I believe triggers the bug.)\n\nThe patches go on top of the linux-stable kernel at version 3.12.17. They\napply with no real problems. (There was a minor issue, but I don't believe\nit has anything to do with this bug. It was to deal with a patch later on\nin the patch set.)\n\nEach patch is added and committed as a separate commit.\n\nI am then doing a fast-forward rebase on the branch to 3.12.45.\n\nThe first 24 patches apply cleanly. The 25th has merge conflicts. One of\nthe files it conflicts on is one that is added by patch 4. That should not\nhappen.\n\nIf I remove the following settings from my ~/.gitconfig, the rebase works\ncorrectly.\n\n[apply]\n        whitespace = fix\n\n[core]\n        whitespace = trailing-space,space-before-tab,indent-with-non-tab\n\nThe diff with the --check option shows the following on the file:\n\narch/x86/pci/intel_media_proc_gen3.c:427: space before tab in indent.\n+               pci_direct_conf1.read(0, 1,\nPCI_DEVFN(av_dev_reg_fixups_ce2600[i].dev,\narch/x86/pci/intel_media_proc_gen3.c:428: space before tab in indent.\n+               av_dev_reg_fixups_ce2600[i].func),\nav_dev_reg_fixups_ce2600[i].reg, 4,\narch/x86/pci/intel_media_proc_gen3.c:914: indent with spaces.\n+        *table = flash_layout_table;\narch/x86/pci/intel_media_proc_gen3.c:915: indent with spaces.\n+        *len = flash_layout_table_length;\narch/x86/pci/intel_media_proc_gen3.c:916: indent with spaces.\n+        return 0;\narch/x86/pci/intel_media_proc_gen3.c:956: space before tab in indent.\n+                       raw_pci_ops = &ce_soc_pci_conf;\narch/x86/pci/intel_media_proc_gen3.c:968: space before tab in indent.\n+               raw_pci_ops = &ce_soc_pci_conf;\narch/x86/pci/intel_media_proc_gen3.c:984: space before tab in indent.\n+               pci_direct_conf1.write(0, 0, 0, 0xd0, 4, 0x060040f0);\narch/x86/pci/intel_media_proc_gen3.c:989: space before tab in indent.\n+               raw_pci_ops = &ce_soc_pci_conf;\n\n\nWhat I believe is happening is that the patches get readded to the HEAD of\n3.12.45 and gets corrected for whitespace. When it gets to the next\noccurrence of the file, it is compared before the whitespace gets\ncorrected. (I don't know if this is the actual cause, but it seems\nlikely.)\n\nIf I comment out the above config lines, the rebase works as expected.\n\nIt is only this one file that triggers it. I am trying to figure out a\nsmall test case that triggers it without including all 50+ patches.\n\nIdeas?\n"},{"id":"267230","messageId":"7b32dd1872a8a110caffd5a58d535870.squirrel@clueserver.org","threadId":"39986","inReplyTo":"14fe2a0c9b92fc27d3ab5b2083cb16b2.squirrel@clueserver.org","subject":"Re: Rebase bug","fromName":"","fromEmail":"alan@clueserver.org","sentAt":"2015-07-31T21:44:46Z","receivedAt":"2015-07-31T21:44:46Z","isPatch":false,"sender":{"key":"alan@clueserver.org","avatar":null},"body":"> I think I have identified an obscure bug. I have a reproducible test case.\n> I am trying to come up with enough of a test case that can be used for\n> finding and fixing the issue.\n\nBTW, I have tested this on 1.7.6.6 and 2.5.0. Same results on either version.\n"}]}