{"thread":{"id":"26588","subject":"new behaviour in git merge","startedAt":"2011-02-24T03:33:53Z","lastAt":"2011-02-26T18:43:10Z","messageCount":8,"participants":["Stephen Rothwell","Jeff King","Elijah Newren"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"162105","messageId":"20110224143353.ddaa316a.sfr@canb.auug.org.au","threadId":"26588","inReplyTo":null,"subject":"new behaviour in git merge","fromName":"Stephen Rothwell","fromEmail":"sfr@canb.auug.org.au","sentAt":"2011-02-24T03:33:53Z","receivedAt":"2011-02-24T03:33:53Z","isPatch":false,"sender":{"key":"sfr@canb.auug.org.au","avatar":null},"body":"Hi all,\n\nI am not sure when this started, but I think git has changed its behaviour\nwhen merging.   As you all know, I do a lot of merging of trees for\nlinux-next each day.  Today I noticed that when I merge a tree, sometimes\nthe timestamps are modified for files that are not modified on one side\nof the merge.  It is not consistent and it is not all the files that are\nmodified on the HEAD side (relative to the merge-base).\n\nFor example, today when I merged the drm tree:\n\n$ git merge drm/drm-next\nAuto-merging drivers/gpu/drm/drm_info.c\nRemoving drivers/gpu/drm/i830/Makefile\nRemoving drivers/gpu/drm/i830/i830_dma.c\nRemoving drivers/gpu/drm/i830/i830_drv.c\nRemoving drivers/gpu/drm/i830/i830_drv.h\nRemoving drivers/gpu/drm/i830/i830_irq.c\nAuto-merging drivers/gpu/drm/i915/i915_drv.c\nAuto-merging drivers/gpu/drm/i915/i915_drv.h\nAuto-merging drivers/gpu/drm/i915/intel_sdvo.c\nAuto-merging drivers/gpu/drm/radeon/atombios_crtc.c\nAuto-merging drivers/gpu/drm/radeon/evergreen_blit_kms.c\nAuto-merging drivers/gpu/drm/radeon/r600.c\nAuto-merging drivers/gpu/drm/radeon/r600_blit_kms.c\nAuto-merging drivers/gpu/drm/radeon/r600_cs.c\nAuto-merging drivers/gpu/drm/radeon/r600d.h\nAuto-merging drivers/gpu/drm/radeon/radeon_device.c\nAuto-merging drivers/gpu/drm/radeon/radeon_display.c\nAuto-merging drivers/gpu/drm/radeon/radeon_mode.h\nAuto-merging drivers/gpu/drm/radeon/radeon_ttm.c\nAuto-merging drivers/gpu/drm/radeon/rv770.c\nRemoving include/drm/i830_drm.h\nMerge made by recursive.\n drivers/gpu/drm/Kconfig                     |   47 +-\n drivers/gpu/drm/Makefile                    |    3 +-\n drivers/gpu/drm/drm_crtc.c                  |   33 +\n drivers/gpu/drm/drm_drv.c                   |   48 +-\n drivers/gpu/drm/drm_edid.c                  |   19 +-\n drivers/gpu/drm/drm_edid_modes.h            |    4 +-\n drivers/gpu/drm/drm_fb_helper.c             |    5 +\n drivers/gpu/drm/drm_gem.c                   |    5 +-\n drivers/gpu/drm/drm_hashtab.c               |   27 +-\n drivers/gpu/drm/drm_info.c                  |   27 +-\n drivers/gpu/drm/drm_ioctl.c                 |  115 +--\n drivers/gpu/drm/drm_irq.c                   |   14 +-\n drivers/gpu/drm/drm_mm.c                    |  570 ++++++-----\n drivers/gpu/drm/drm_modes.c                 |    6 +-\n drivers/gpu/drm/drm_pci.c                   |  205 ++++-\n drivers/gpu/drm/drm_platform.c              |   75 ++-\n drivers/gpu/drm/drm_stub.c                  |   21 +-\n drivers/gpu/drm/drm_usb.c                   |  117 ++\n drivers/gpu/drm/i810/i810_dma.c             |   18 +-\n drivers/gpu/drm/i810/i810_drv.c             |   20 +-\n drivers/gpu/drm/i830/Makefile               |    8 -\n drivers/gpu/drm/i830/i830_dma.c             | 1560 ---------------------------\n drivers/gpu/drm/i830/i830_drv.c             |  107 --\n drivers/gpu/drm/i830/i830_drv.h             |  295 -----\n drivers/gpu/drm/i830/i830_irq.c             |  186 ----\n drivers/gpu/drm/i915/i915_drv.c             |   23 +-\n drivers/gpu/drm/i915/i915_drv.h             |    7 +\n drivers/gpu/drm/i915/i915_gem.c             |  103 ++-\n drivers/gpu/drm/i915/intel_sdvo.c           |    2 +-\n drivers/gpu/drm/mga/mga_dma.c               |    2 +-\n drivers/gpu/drm/mga/mga_drv.c               |   13 +-\n drivers/gpu/drm/nouveau/nouveau_drv.c       |   21 +-\n drivers/gpu/drm/nouveau/nouveau_mem.c       |    2 +-\n drivers/gpu/drm/nouveau/nouveau_object.c    |    2 +-\n drivers/gpu/drm/nouveau/nouveau_sgdma.c     |   31 +-\n drivers/gpu/drm/nouveau/nouveau_state.c     |    4 +-\n drivers/gpu/drm/nouveau/nv17_tv.c           |    4 +-\n drivers/gpu/drm/nouveau/nv17_tv.h           |    2 +-\n drivers/gpu/drm/nouveau/nv17_tv_modes.c     |    2 +-\n drivers/gpu/drm/nouveau/nv50_instmem.c      |    4 +-\n drivers/gpu/drm/nouveau/nvc0_instmem.c      |    2 +-\n drivers/gpu/drm/r128/r128_drv.c             |   14 +-\n drivers/gpu/drm/radeon/atombios_crtc.c      |    8 +-\n drivers/gpu/drm/radeon/evergreen_blit_kms.c |    2 +-\n drivers/gpu/drm/radeon/r600.c               |    2 +-\n drivers/gpu/drm/radeon/r600_audio.c         |    1 +\n drivers/gpu/drm/radeon/r600_blit_kms.c      |    2 +-\n drivers/gpu/drm/radeon/r600_cs.c            |  353 ++++--\n drivers/gpu/drm/radeon/r600_hdmi.c          |    1 +\n drivers/gpu/drm/radeon/r600d.h              |    5 +\n drivers/gpu/drm/radeon/radeon.h             |   90 +--\n drivers/gpu/drm/radeon/radeon_asic.h        |   77 ++-\n drivers/gpu/drm/radeon/radeon_benchmark.c   |    4 +-\n drivers/gpu/drm/radeon/radeon_cp.c          |    4 +-\n drivers/gpu/drm/radeon/radeon_cs.c          |    2 +-\n drivers/gpu/drm/radeon/radeon_device.c      |    4 +-\n drivers/gpu/drm/radeon/radeon_display.c     |    4 +-\n drivers/gpu/drm/radeon/radeon_drv.c         |   49 +-\n drivers/gpu/drm/radeon/radeon_fb.c          |   12 +-\n drivers/gpu/drm/radeon/radeon_gart.c        |   38 +-\n drivers/gpu/drm/radeon/radeon_gem.c         |   96 ++-\n drivers/gpu/drm/radeon/radeon_kms.c         |    4 +-\n drivers/gpu/drm/radeon/radeon_legacy_crtc.c |    4 +-\n drivers/gpu/drm/radeon/radeon_mode.h        |    1 +\n drivers/gpu/drm/radeon/radeon_object.c      |   28 +-\n drivers/gpu/drm/radeon/radeon_object.h      |    7 +-\n drivers/gpu/drm/radeon/radeon_ring.c        |    4 +-\n drivers/gpu/drm/radeon/radeon_test.c        |    4 +-\n drivers/gpu/drm/radeon/radeon_ttm.c         |   10 +-\n drivers/gpu/drm/radeon/rv770.c              |    2 +-\n drivers/gpu/drm/savage/savage_drv.c         |   14 +-\n drivers/gpu/drm/sis/sis_drv.c               |   13 +-\n drivers/gpu/drm/tdfx/tdfx_drv.c             |   13 +-\n drivers/gpu/drm/ttm/ttm_agp_backend.c       |    3 +-\n drivers/gpu/drm/ttm/ttm_bo.c                |    3 +-\n drivers/gpu/drm/ttm/ttm_page_alloc.c        |   34 +-\n drivers/gpu/drm/ttm/ttm_tt.c                |   12 +-\n drivers/gpu/drm/via/via_drv.c               |   13 +-\n drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c      |    3 +-\n drivers/gpu/drm/vmwgfx/vmwgfx_drv.c         |   23 +-\n drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c         |    5 +-\n include/drm/Kbuild                          |    1 -\n include/drm/drm.h                           |    4 +\n include/drm/drmP.h                          |  120 ++-\n include/drm/drm_crtc.h                      |   13 +-\n include/drm/drm_hashtab.h                   |    6 +-\n include/drm/drm_mm.h                        |   49 +-\n include/drm/drm_mode.h                      |   29 +\n include/drm/drm_usb.h                       |   15 +\n include/drm/i830_drm.h                      |  342 ------\n include/drm/ttm/ttm_bo_driver.h             |    6 +-\n include/drm/ttm/ttm_page_alloc.h            |    8 +-\n 92 files changed, 1755 insertions(+), 3565 deletions(-)\n create mode 100644 drivers/gpu/drm/drm_usb.c\n delete mode 100644 drivers/gpu/drm/i830/Makefile\n delete mode 100644 drivers/gpu/drm/i830/i830_dma.c\n delete mode 100644 drivers/gpu/drm/i830/i830_drv.c\n delete mode 100644 drivers/gpu/drm/i830/i830_drv.h\n delete mode 100644 drivers/gpu/drm/i830/i830_irq.c\n create mode 100644 include/drm/drm_usb.h\n delete mode 100644 include/drm/i830_drm.h\n\nThen the timestamps on all these files were updated (this is the list of\nfiles rsync has decided to copy - I checked and the timestamps are indeed\nmodified):\n\nDocumentation/devicetree/booting-without-of.txt\nDocumentation/devicetree/bindings/eeprom.txt\nDocumentation/devicetree/bindings/marvell.txt\nDocumentation/devicetree/bindings/xilinx.txt\nDocumentation/devicetree/bindings/ata/fsl-sata.txt\nDocumentation/devicetree/bindings/gpio/8xxx_gpio.txt\nDocumentation/devicetree/bindings/gpio/gpio.txt\nDocumentation/devicetree/bindings/gpio/led.txt\nDocumentation/devicetree/bindings/i2c/fsl-i2c.txt\nDocumentation/devicetree/bindings/mmc/fsl-esdhc.txt\nDocumentation/devicetree/bindings/mmc/mmc-spi-slot.txt\nDocumentation/devicetree/bindings/mtd/fsl-upm-nand.txt\nDocumentation/devicetree/bindings/mtd/mtd-physmap.txt\nDocumentation/devicetree/bindings/net/fsl-tsec-phy.txt\nDocumentation/devicetree/bindings/net/mdio-gpio.txt\nDocumentation/devicetree/bindings/net/phy.txt\nDocumentation/devicetree/bindings/net/can/mpc5xxx-mscan.txt\nDocumentation/devicetree/bindings/net/can/sja1000.txt\nDocumentation/devicetree/bindings/pci/83xx-512x-pci.txt\nDocumentation/devicetree/bindings/powerpc/4xx/cpm.txt\nDocumentation/devicetree/bindings/powerpc/4xx/emac.txt\nDocumentation/devicetree/bindings/powerpc/4xx/ndfc.txt\nDocumentation/devicetree/bindings/powerpc/4xx/ppc440spe-adma.txt\nDocumentation/devicetree/bindings/powerpc/4xx/reboot.txt\nDocumentation/devicetree/bindings/powerpc/fsl/board.txt\nDocumentation/devicetree/bindings/powerpc/fsl/diu.txt\nDocumentation/devicetree/bindings/powerpc/fsl/dma.txt\nDocumentation/devicetree/bindings/powerpc/fsl/ecm.txt\nDocumentation/devicetree/bindings/powerpc/fsl/gtm.txt\nDocumentation/devicetree/bindings/powerpc/fsl/guts.txt\nDocumentation/devicetree/bindings/powerpc/fsl/lbc.txt\nDocumentation/devicetree/bindings/powerpc/fsl/mcm.txt\nDocumentation/devicetree/bindings/powerpc/fsl/mcu-mpc8349emitx.txt\nDocumentation/devicetree/bindings/powerpc/fsl/mpc5121-psc.txt\nDocumentation/devicetree/bindings/powerpc/fsl/mpc5200.txt\nDocumentation/devicetree/bindings/powerpc/fsl/mpic.txt\nDocumentation/devicetree/bindings/powerpc/fsl/msi-pic.txt\nDocumentation/devicetree/bindings/powerpc/fsl/pmc.txt\nDocumentation/devicetree/bindings/powerpc/fsl/sec.txt\nDocumentation/devicetree/bindings/powerpc/fsl/ssi.txt\nDocumentation/devicetree/bindings/powerpc/fsl/cpm_qe/cpm.txt\nDocumentation/devicetree/bindings/powerpc/fsl/cpm_qe/gpio.txt\nDocumentation/devicetree/bindings/powerpc/fsl/cpm_qe/network.txt\nDocumentation/devicetree/bindings/powerpc/fsl/cpm_qe/qe.txt\nDocumentation/devicetree/bindings/powerpc/fsl/cpm_qe/serial.txt\nDocumentation/devicetree/bindings/powerpc/fsl/cpm_qe/cpm/brg.txt\nDocumentation/devicetree/bindings/powerpc/fsl/cpm_qe/cpm/i2c.txt\nDocumentation/devicetree/bindings/powerpc/fsl/cpm_qe/cpm/pic.txt\nDocumentation/devicetree/bindings/powerpc/fsl/cpm_qe/cpm/usb.txt\nDocumentation/devicetree/bindings/powerpc/fsl/cpm_qe/qe/firmware.txt\nDocumentation/devicetree/bindings/powerpc/fsl/cpm_qe/qe/par_io.txt\nDocumentation/devicetree/bindings/powerpc/fsl/cpm_qe/qe/pincfg.txt\nDocumentation/devicetree/bindings/powerpc/fsl/cpm_qe/qe/ucc.txt\nDocumentation/devicetree/bindings/powerpc/fsl/cpm_qe/qe/usb.txt\nDocumentation/devicetree/bindings/powerpc/nintendo/gamecube.txt\nDocumentation/devicetree/bindings/powerpc/nintendo/wii.txt\nDocumentation/devicetree/bindings/spi/fsl-spi.txt\nDocumentation/devicetree/bindings/spi/spi-bus.txt\nDocumentation/devicetree/bindings/usb/fsl-usb.txt\nDocumentation/devicetree/bindings/usb/usb-ehci.txt\nDocumentation/laptops/hpfall.c\nDocumentation/misc-devices/lis3lv02d\narch/arm/mach-exynos4/Kconfig\narch/arm/mach-exynos4/Makefile.boot\narch/arm/mach-exynos4/clock.c\narch/arm/mach-exynos4/cpu.c\narch/arm/mach-exynos4/cpufreq.c\narch/arm/mach-exynos4/dev-audio.c\narch/arm/mach-exynos4/dev-pd.c\narch/arm/mach-exynos4/dev-sysmmu.c\narch/arm/mach-exynos4/dma.c\narch/arm/mach-exynos4/gpiolib.c\narch/arm/mach-exynos4/headsmp.S\narch/arm/mach-exynos4/hotplug.c\narch/arm/mach-exynos4/init.c\narch/arm/mach-exynos4/irq-combiner.c\narch/arm/mach-exynos4/irq-eint.c\narch/arm/mach-exynos4/localtimer.c\narch/arm/mach-exynos4/mach-smdkc210.c\narch/arm/mach-exynos4/mach-smdkv310.c\narch/arm/mach-exynos4/mach-universal_c210.c\narch/arm/mach-exynos4/platsmp.c\narch/arm/mach-exynos4/setup-i2c0.c\narch/arm/mach-exynos4/setup-i2c1.c\narch/arm/mach-exynos4/setup-i2c2.c\narch/arm/mach-exynos4/setup-i2c3.c\narch/arm/mach-exynos4/setup-i2c4.c\narch/arm/mach-exynos4/setup-i2c5.c\narch/arm/mach-exynos4/setup-i2c6.c\narch/arm/mach-exynos4/setup-i2c7.c\narch/arm/mach-exynos4/setup-sdhci-gpio.c\narch/arm/mach-exynos4/setup-sdhci.c\narch/arm/mach-exynos4/time.c\narch/arm/mach-exynos4/include/mach/debug-macro.S\narch/arm/mach-exynos4/include/mach/entry-macro.S\narch/arm/mach-exynos4/include/mach/hardware.h\narch/arm/mach-exynos4/include/mach/io.h\narch/arm/mach-exynos4/include/mach/irqs.h\narch/arm/mach-exynos4/include/mach/memory.h\narch/arm/mach-exynos4/include/mach/pwm-clock.h\narch/arm/mach-exynos4/include/mach/regs-clock.h\narch/arm/mach-exynos4/include/mach/regs-irq.h\narch/arm/mach-exynos4/include/mach/regs-mem.h\narch/arm/mach-exynos4/include/mach/regs-pmu.h\narch/arm/mach-exynos4/include/mach/regs-sysmmu.h\narch/arm/mach-exynos4/include/mach/smp.h\narch/arm/mach-exynos4/include/mach/sysmmu.h\narch/arm/mach-exynos4/include/mach/system.h\narch/arm/mach-exynos4/include/mach/timex.h\narch/arm/mach-exynos4/include/mach/uncompress.h\narch/arm/mach-exynos4/include/mach/vmalloc.h\narch/arm/mach-msm/devices-iommu.c\narch/arm/mach-mx5/devices-imx50.h\narch/arm/mach-vt8500/include/mach/vmalloc.h\narch/arm/plat-versatile/headsmp.S\narch/arm/plat-versatile/localtimer.c\ndrivers/char/virtio_console.c\ndeleting drivers/gpu/drm/i830/i830_irq.c\ndeleting drivers/gpu/drm/i830/i830_drv.h\ndeleting drivers/gpu/drm/i830/i830_drv.c\ndeleting drivers/gpu/drm/i830/i830_dma.c\ndeleting drivers/gpu/drm/i830/Makefile\ndrivers/gpu/drm/Kconfig\ndrivers/gpu/drm/Makefile\ndrivers/gpu/drm/drm_crtc.c\ndrivers/gpu/drm/drm_drv.c\ndrivers/gpu/drm/drm_edid.c\ndrivers/gpu/drm/drm_edid_modes.h\ndrivers/gpu/drm/drm_fb_helper.c\ndrivers/gpu/drm/drm_gem.c\ndrivers/gpu/drm/drm_hashtab.c\ndrivers/gpu/drm/drm_info.c\ndrivers/gpu/drm/drm_ioctl.c\ndrivers/gpu/drm/drm_irq.c\ndrivers/gpu/drm/drm_mm.c\ndrivers/gpu/drm/drm_modes.c\ndrivers/gpu/drm/drm_pci.c\ndrivers/gpu/drm/drm_platform.c\ndrivers/gpu/drm/drm_stub.c\ndrivers/gpu/drm/drm_usb.c\ndrivers/gpu/drm/i810/i810_dma.c\ndrivers/gpu/drm/i810/i810_drv.c\ndrivers/gpu/drm/i915/i915_drv.c\ndrivers/gpu/drm/i915/i915_drv.h\ndrivers/gpu/drm/i915/i915_gem.c\ndrivers/gpu/drm/i915/intel_sdvo.c\ndrivers/gpu/drm/mga/mga_dma.c\ndrivers/gpu/drm/mga/mga_drv.c\ndrivers/gpu/drm/nouveau/nouveau_drv.c\ndrivers/gpu/drm/nouveau/nouveau_mem.c\ndrivers/gpu/drm/nouveau/nouveau_object.c\ndrivers/gpu/drm/nouveau/nouveau_sgdma.c\ndrivers/gpu/drm/nouveau/nouveau_state.c\ndrivers/gpu/drm/nouveau/nv17_tv.c\ndrivers/gpu/drm/nouveau/nv17_tv.h\ndrivers/gpu/drm/nouveau/nv17_tv_modes.c\ndrivers/gpu/drm/nouveau/nv50_instmem.c\ndrivers/gpu/drm/nouveau/nvc0_instmem.c\ndrivers/gpu/drm/r128/r128_drv.c\ndrivers/gpu/drm/radeon/atombios_crtc.c\ndrivers/gpu/drm/radeon/evergreen_blit_kms.c\ndrivers/gpu/drm/radeon/r600.c\ndrivers/gpu/drm/radeon/r600_audio.c\ndrivers/gpu/drm/radeon/r600_blit_kms.c\ndrivers/gpu/drm/radeon/r600_cs.c\ndrivers/gpu/drm/radeon/r600_hdmi.c\ndrivers/gpu/drm/radeon/r600d.h\ndrivers/gpu/drm/radeon/radeon.h\ndrivers/gpu/drm/radeon/radeon_asic.h\ndrivers/gpu/drm/radeon/radeon_benchmark.c\ndrivers/gpu/drm/radeon/radeon_cp.c\ndrivers/gpu/drm/radeon/radeon_cs.c\ndrivers/gpu/drm/radeon/radeon_device.c\ndrivers/gpu/drm/radeon/radeon_display.c\ndrivers/gpu/drm/radeon/radeon_drv.c\ndrivers/gpu/drm/radeon/radeon_fb.c\ndrivers/gpu/drm/radeon/radeon_gart.c\ndrivers/gpu/drm/radeon/radeon_gem.c\ndrivers/gpu/drm/radeon/radeon_kms.c\ndrivers/gpu/drm/radeon/radeon_legacy_crtc.c\ndrivers/gpu/drm/radeon/radeon_mode.h\ndrivers/gpu/drm/radeon/radeon_object.c\ndrivers/gpu/drm/radeon/radeon_object.h\ndrivers/gpu/drm/radeon/radeon_ring.c\ndrivers/gpu/drm/radeon/radeon_test.c\ndrivers/gpu/drm/radeon/radeon_ttm.c\ndrivers/gpu/drm/radeon/rv770.c\ndrivers/gpu/drm/savage/savage_drv.c\ndrivers/gpu/drm/sis/sis_drv.c\ndrivers/gpu/drm/tdfx/tdfx_drv.c\ndrivers/gpu/drm/ttm/ttm_agp_backend.c\ndrivers/gpu/drm/ttm/ttm_bo.c\ndrivers/gpu/drm/ttm/ttm_page_alloc.c\ndrivers/gpu/drm/ttm/ttm_tt.c\ndrivers/gpu/drm/via/via_drv.c\ndrivers/gpu/drm/vmwgfx/vmwgfx_buffer.c\ndrivers/gpu/drm/vmwgfx/vmwgfx_drv.c\ndrivers/gpu/drm/vmwgfx/vmwgfx_ldu.c\ndrivers/misc/lis3lv02d/lis3lv02d.c\ndrivers/misc/lis3lv02d/lis3lv02d.h\ndrivers/misc/lis3lv02d/lis3lv02d_i2c.c\ndrivers/misc/lis3lv02d/lis3lv02d_spi.c\ndrivers/net/wireless/iwlegacy/iwl-3945-debugfs.c\ndrivers/net/wireless/iwlegacy/iwl-3945-fh.h\ndrivers/net/wireless/iwlegacy/iwl-3945-hw.h\ndrivers/net/wireless/iwlegacy/iwl-3945-rs.c\ndrivers/net/wireless/iwlegacy/iwl-3945.c\ndrivers/net/wireless/iwlegacy/iwl-3945.h\ndrivers/net/wireless/iwlegacy/iwl-4965-debugfs.h\ndrivers/net/wireless/iwlegacy/iwl-4965-eeprom.c\ndrivers/net/wireless/iwlegacy/iwl-4965-hw.h\ndrivers/net/wireless/iwlegacy/iwl-4965-led.c\ndrivers/net/wireless/iwlegacy/iwl-4965.c\ndrivers/net/wireless/iwlegacy/iwl3945-base.c\ndrivers/net/wireless/rtlwifi/rtl8192c/fw_common.c\ndrivers/net/wireless/rtlwifi/rtl8192c/fw_common.h\ndrivers/net/wireless/rtlwifi/rtl8192cu/rf.h\ndrivers/platform/x86/hp_accel.c\ndrivers/scsi/fcoe/fcoe_ctlr.c\ndrivers/watchdog/m54xx_wdt.c\ndeleting include/drm/i830_drm.h\ninclude/drm/Kbuild\ninclude/drm/drm.h\ninclude/drm/drmP.h\ninclude/drm/drm_crtc.h\ninclude/drm/drm_hashtab.h\ninclude/drm/drm_mm.h\ninclude/drm/drm_mode.h\ninclude/drm/drm_usb.h\ninclude/drm/ttm/ttm_bo_driver.h\ninclude/drm/ttm/ttm_page_alloc.h\ninclude/linux/hid-roccat.h\ninclude/linux/i2c-tegra.h\ninclude/linux/i2c/atmel_mxt_ts.h\ninclude/media/s5p_fimc.h\nnet/bluetooth/l2cap_core.c\n\nI am pretty sure that git did not used to do this. Has anyone else seen\nthis?  I am running git version 1.7.4.1 from Debian unstable.\n-- \nCheers,\nStephen Rothwell                    sfr@canb.auug.org.au\n"},{"id":"162111","messageId":"20110224081553.GD25595@sigill.intra.peff.net","threadId":"26588","inReplyTo":"20110224143353.ddaa316a.sfr@canb.auug.org.au","subject":"Re: new behaviour in git merge","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2011-02-24T08:15:53Z","receivedAt":"2011-02-24T08:15:53Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Feb 24, 2011 at 02:33:53PM +1100, Stephen Rothwell wrote:\n\n> I am not sure when this started, but I think git has changed its behaviour\n> when merging.   As you all know, I do a lot of merging of trees for\n> linux-next each day.  Today I noticed that when I merge a tree, sometimes\n> the timestamps are modified for files that are not modified on one side\n> of the merge.  It is not consistent and it is not all the files that are\n> modified on the HEAD side (relative to the merge-base).\n>\n> [...]\n>\n> I am pretty sure that git did not used to do this. Has anyone else seen\n> this?  I am running git version 1.7.4.1 from Debian unstable.\n\nI don't think any such change was intentional.  I couldn't reproduce\nwith a trivial example. Can you give the commit IDs of the two heads in\nyour example merge? I'd like to try bisecting if I can reproduce the\nissue.\n\n-Peff\n"},{"id":"162117","messageId":"20110224202454.d3b8668e.sfr@canb.auug.org.au","threadId":"26588","inReplyTo":"20110224081553.GD25595@sigill.intra.peff.net","subject":"Re: new behaviour in git merge","fromName":"Stephen Rothwell","fromEmail":"sfr@canb.auug.org.au","sentAt":"2011-02-24T09:24:54Z","receivedAt":"2011-02-24T09:24:54Z","isPatch":false,"sender":{"key":"sfr@canb.auug.org.au","avatar":null},"body":"Hi Jeff,\n\nOn Thu, 24 Feb 2011 03:15:53 -0500 Jeff King <peff@peff.net> wrote:\n>\n> I don't think any such change was intentional.  I couldn't reproduce\n\nI was hoping that it was not intentional :-)\n\n> with a trivial example. Can you give the commit IDs of the two heads in\n\nI also tried a trivial example but failed to reproduce it.\n\n> your example merge? I'd like to try bisecting if I can reproduce the\n> issue.\n\nIn today's linux-next tree (available at\ngit://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git),\ncommit ad11c1e8abca18872c2993b09b1abde418955b6c is just before the merge\nand commit a2c06ee2fe5b48a71e697bae00c6e7195fc016b6 is what was merged.\n\nI just did this in a copy of my tree:\n\n\tgit reset --hard ad11c1e8abca18872c2993b09b1abde418955b6c\n\tsleep 90\n\tgit merge a2c06ee2fe5b48a71e697bae00c6e7195fc016b6\n\nA comparison of the ls -lR ouput before and after showed a lot of changed\nmodification times.\n\nSeveral other merges showed the same problem.\n\nThanks for looking at this.\n-- \nCheers,\nStephen Rothwell                    sfr@canb.auug.org.au\nhttp://www.canb.auug.org.au/~sfr/\n"},{"id":"162131","messageId":"20110224115233.GA31356@sigill.intra.peff.net","threadId":"26588","inReplyTo":"20110224202454.d3b8668e.sfr@canb.auug.org.au","subject":"Re: new behaviour in git merge","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2011-02-24T11:52:33Z","receivedAt":"2011-02-24T11:52:33Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"[+cc Elijah Newren; this is a bug that bisects to one of your commits.\n The backstory is that during a merge, many unrelated files get\n unnecessarily re-written with the same content. Read on for details.]\n\nOn Thu, Feb 24, 2011 at 08:24:54PM +1100, Stephen Rothwell wrote:\n\n> In today's linux-next tree (available at\n> git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git),\n> commit ad11c1e8abca18872c2993b09b1abde418955b6c is just before the merge\n> and commit a2c06ee2fe5b48a71e697bae00c6e7195fc016b6 is what was merged.\n> \n> I just did this in a copy of my tree:\n> \n> \tgit reset --hard ad11c1e8abca18872c2993b09b1abde418955b6c\n> \tsleep 90\n> \tgit merge a2c06ee2fe5b48a71e697bae00c6e7195fc016b6\n> \n> A comparison of the ls -lR ouput before and after showed a lot of changed\n> modification times.\n> \n> Several other merges showed the same problem.\n\nThanks for the reproduction recipe. I was able to bisect using this\nscript as my test:\n\n-- >8 --\n#!/bin/sh\n\nstat() {\n  git ls-files -z | xargs --null stat --format='%Y %n' | sort\n}\n\ncd linux-next &&\ngit reset --hard ad11c1e8abca18872c2993b09b1abde418955b6c &&\nsleep 3 &&\nstat >before &&\ngit merge a2c06ee2fe5b48a71e697bae00c6e7195fc016b6 &&\nstat >after &&\ncomm -13 before after | cut -d' ' -f2 | sort >stat-diff &&\ngit diff-tree -r --name-only HEAD HEAD^ >tree-diff &&\ncomm -23 stat-diff tree-diff >extra-stats &&\nif test -s extra-stats; then\n  cat extra-stats\n  echo FAIL\n  exit 1\nelse\n  echo OK\n  exit 0\nfi\n-- 8< --\n\nIt bisects to 882fd11 (merge-recursive: Delay content merging for\nrenames, 2010-09-20). And indeed, looking further at the files that get\nmodified, they appear to be renames on one side of the merge, but not\ntouched on the other side. But rather than notice that there is nothing\nto be done on them, we seem to update the index and write out the new\nentries.\n\nThe patch below makes the problem go away in your test case, but also\nintroduces some test failures in t3509, so I'm sure there is something\nelse going on. I'm somewhat clueless about the merge code, so I'll defer\nto Elijah, who wrote 882fd11, and see what he says.\n\n-Peff\n\ndiff --git a/merge-recursive.c b/merge-recursive.c\nindex 0ca54bd..1dd643f 100644\n--- a/merge-recursive.c\n+++ b/merge-recursive.c\n@@ -1083,7 +1083,8 @@ static int process_renames(struct merge_options *o,\n \t\t\t\t\tb = ren1->pair->two;\n \t\t\t\t\ta = &src_other;\n \t\t\t\t}\n-\t\t\t\tupdate_stages_and_entry(ren1_dst, ren1->dst_entry, one, a, b, 1);\n+\t\t\t\tif (hashcmp(one->sha1, b->sha1))\n+\t\t\t\t\tupdate_stages_and_entry(ren1_dst, ren1->dst_entry, one, a, b, 1);\n \t\t\t\tif (string_list_has_string(&o->current_directory_set, ren1_dst)) {\n \t\t\t\t\tsetup_rename_df_conflict_info(RENAME_NORMAL,\n \t\t\t\t\t\t\t\t      ren1->pair,\n"},{"id":"162316","messageId":"1298745297-25713-1-git-send-email-newren@gmail.com","threadId":"26588","inReplyTo":"20110224115233.GA31356@sigill.intra.peff.net","subject":"[RFC PATCH 0/2] Fix unnecessary updates of files during merge","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2011-02-26T18:34:55Z","receivedAt":"2011-02-26T18:34:55Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"This patch series adds a simple testcase demonstrating the problem\nreported by Stephen Rothwell, and a fix.  Unfortunately, there's a bug\nwith the fix (hence the RFC) that makes the relevant files racily clean\nrather than clearly clean (i.e. 'git diff-files' will report these files\nas modified when it shouldn't).\n\nI'll try to figure out how to fix the second problem in the next few\ndays.  If anyone has some hints, I'm all ears.\n\nElijah Newren (2):\n  t6022: New test checking for unnecessary updates of renamed+modified\n    files\n  merge-recursive: When we detect we can skip an update, actually skip\n    it\n\n merge-recursive.c       |    7 +++++--\n t/t6022-merge-rename.sh |   32 ++++++++++++++++++++++++++++++++\n 2 files changed, 37 insertions(+), 2 deletions(-)\n\n-- \n1.7.4.1.23.g4865dd\n"},{"id":"162317","messageId":"1298745297-25713-2-git-send-email-newren@gmail.com","threadId":"26588","inReplyTo":"1298745297-25713-1-git-send-email-newren@gmail.com","subject":"[RFC PATCH 1/2] t6022: New test checking for unnecessary updates of renamed+modified files","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2011-02-26T18:34:56Z","receivedAt":"2011-02-26T18:34:56Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\n t/t6022-merge-rename.sh |   32 ++++++++++++++++++++++++++++++++\n 1 files changed, 32 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t6022-merge-rename.sh b/t/t6022-merge-rename.sh\nindex 1ed259d..71bfd22 100755\n--- a/t/t6022-merge-rename.sh\n+++ b/t/t6022-merge-rename.sh\n@@ -609,4 +609,36 @@ test_expect_success 'check handling of differently renamed file with D/F conflic\n \t! test -f original\n '\n \n+test_expect_success 'setup avoid unnecessary update' '\n+\tgit reset --hard &&\n+\tgit checkout --orphan avoid-unnecessary-update &&\n+\tgit rm -rf . &&\n+\tgit clean -fdqx &&\n+\n+\tprintf \"1\\n2\\n3\\n4\\n5\\n6\\n7\\n8\\n9\\n10\\n\" >original &&\n+\tgit add -A &&\n+\tgit commit -m \"Common commmit\" &&\n+\n+\tgit mv original rename &&\n+\techo 11 >>rename &&\n+\tgit add -u &&\n+\tgit commit -m \"Renamed and modified\" &&\n+\n+\tgit checkout -b other-branch HEAD~1 &&\n+\techo \"random content\" >random-file &&\n+\tgit add -A &&\n+\tgit commit -m \"Random, unrelated changes\"\n+'\n+\n+test_expect_failure 'avoid unnecessary update' '\n+\tgit checkout -q avoid-unnecessary-update^0 &&\n+\torig=$(stat --format=\"%Y\" rename) &&\n+\tsleep 1 &&\n+\tgit merge other-branch &&\n+\tnew=$(stat --format=\"%Y\" rename) &&\n+\techo \"Checking whether stat times are same: $orig vs $new\" &&\n+\ttest \"$orig\" == \"$new\" &&\n+\tgit diff-files --exit-code # Is \"rename\" clean, or only racily clean?\n+'\n+\n test_done\n-- \n1.7.4.1.23.g4865dd\n"},{"id":"162318","messageId":"1298745297-25713-3-git-send-email-newren@gmail.com","threadId":"26588","inReplyTo":"1298745297-25713-1-git-send-email-newren@gmail.com","subject":"[RFC PATCH 2/2] merge-recursive: When we detect we can skip an update, actually skip it","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2011-02-26T18:34:57Z","receivedAt":"2011-02-26T18:34:57Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"In 882fd11 (merge-recursive: Delay content merging for renames 2010-09-20),\nthe code that checked for whether we could skip updating a file in the\nworking directory (due to the merged version matching the current copy) was\nmoved into a separate function.  In order to defer the content merging, we\nhad to update the index with unmerged entries.  As part of the move, a bug\nwas introduced such that the message about skipping the update would be\nprinted (if GIT_MERGE_VERBOSITY was sufficiently high) but the file would\nbe updated in the working copy anyway.\n\nWhen we detect that the file does not need to be updated in the working\ncopy, update the index to remove the unmerged entries and then return early\nbefore updating the working copy.\n\nSTILL BROKEN: Unfortunately, this change leaves the index in a state where\nthe renamed file is only racily clean; a 'git diff-files' will report the\nfile as modified.\n\n---\nNo Signed-off-by since it still doesn't work.\n\n merge-recursive.c |    7 +++++--\n 1 files changed, 5 insertions(+), 2 deletions(-)\n\ndiff --git a/merge-recursive.c b/merge-recursive.c\nindex 16c2dbe..94b818c 100644\n--- a/merge-recursive.c\n+++ b/merge-recursive.c\n@@ -1274,9 +1274,12 @@ static int merge_content(struct merge_options *o,\n \t}\n \n \tif (mfi.clean && !df_conflict_remains &&\n-\t    sha_eq(mfi.sha, a_sha) && mfi.mode == a.mode)\n+\t    sha_eq(mfi.sha, a_sha) && mfi.mode == a.mode) {\n \t\toutput(o, 3, \"Skipped %s (merged same as existing)\", path);\n-\telse\n+\t\tadd_cacheinfo(mfi.mode, mfi.sha, path,\n+\t\t\t      0, 0, ADD_CACHE_OK_TO_REPLACE);\n+\t\treturn mfi.clean;\n+\t} else\n \t\toutput(o, 2, \"Auto-merging %s\", path);\n \n \tif (!mfi.clean) {\n-- \n1.7.4.1.23.g4865dd\n"},{"id":"162319","messageId":"AANLkTiknGZ-WQrwhtX9rJ=k1z7p3cYCE-j8F7rt4UL+M@mail.gmail.com","threadId":"26588","inReplyTo":"1298745297-25713-1-git-send-email-newren@gmail.com","subject":"Re: [RFC PATCH 0/2] Fix unnecessary updates of files during merge","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2011-02-26T18:43:10Z","receivedAt":"2011-02-26T18:43:10Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"Hi,\n\nOn Sat, Feb 26, 2011 at 11:34 AM, Elijah Newren <newren@gmail.com> wrote:\n> This patch series adds a simple testcase demonstrating the problem\n> reported by Stephen Rothwell, and a fix.  Unfortunately, there's a bug\n> with the fix (hence the RFC) that makes the relevant files racily clean\n> rather than clearly clean (i.e. 'git diff-files' will report these files\n> as modified when it shouldn't).\n>\n> I'll try to figure out how to fix the second problem in the next few\n> days.  If anyone has some hints, I'm all ears.\n\nAnd, of course, I forgot to include the cc's in my send-email command.\n Sorry about that, Stephen and Jeff.  Adding you on this email, at\nleast.\n\n> Elijah Newren (2):\n>  t6022: New test checking for unnecessary updates of renamed+modified\n>    files\n>  merge-recursive: When we detect we can skip an update, actually skip\n>    it\n>\n>  merge-recursive.c       |    7 +++++--\n>  t/t6022-merge-rename.sh |   32 ++++++++++++++++++++++++++++++++\n>  2 files changed, 37 insertions(+), 2 deletions(-)\n"}]}