为什么 git show 查看 merge tag 的 commit 时会有 diff 的输出?

2022-05-11 11:46:30 +08:00
 kgdb00

例如 linux 内核的这个 commit

git show 38904911e86495d4690f8d805720b90e65426c71 的输出如下:

commit 38904911e86495d4690f8d805720b90e65426c71
Merge: 6f34f8c3d617 c15e0ae42c8e
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Sat Apr 2 12:09:02 2022 -0700

    Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
    
    Pull kvm fixes from Paolo Bonzini:
    
     - Only do MSR filtering for MSRs accessed by rdmsr/wrmsr
    
     - Documentation improvements
    
     - Prevent module exit until all VMs are freed
    
     - PMU Virtualization fixes
    
     - Fix for kvm_irq_delivery_to_apic_fast() NULL-pointer dereferences
    
     - Other miscellaneous bugfixes
    
    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (42 commits)
      KVM: x86: fix sending PV IPI
      KVM: x86/mmu: do compare-and-exchange of gPTE via the user address
      KVM: x86: Remove redundant vm_entry_controls_clearbit() call
      KVM: x86: cleanup enter_rmode()
      KVM: x86: SVM: fix tsc scaling when the host doesn't support it
      kvm: x86: SVM: remove unused defines
      KVM: x86: SVM: move tsc ratio definitions to svm.h
      KVM: x86: SVM: fix avic spec based definitions again
      KVM: MIPS: remove reference to trap&emulate virtualization
      KVM: x86: document limitations of MSR filtering
      KVM: x86: Only do MSR filtering when access MSR by rdmsr/wrmsr
      KVM: x86/emulator: Emulate RDPID only if it is enabled in guest
      KVM: x86/pmu: Fix and isolate TSX-specific performance event logic
      KVM: x86: mmu: trace kvm_mmu_set_spte after the new SPTE was set
      KVM: x86/svm: Clear reserved bits written to PerfEvtSeln MSRs
      KVM: x86: Trace all APICv inhibit changes and capture overall status
      KVM: x86: Add wrappers for setting/clearing APICv inhibits
      KVM: x86: Make APICv inhibit reasons an enum and cleanup naming
      KVM: X86: Handle implicit supervisor access with SMAP
      KVM: X86: Rename variable smap to not_smap in permission_fault()
      ...

diff --cc arch/x86/include/asm/kvm_host.h
index 4138939532c6,93a2671a57cf..d23e80a56eb8
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@@ -512,9 -513,10 +514,10 @@@ struct kvm_pmu 
        u64 global_ctrl_mask;
        u64 global_ovf_ctrl_mask;
        u64 reserved_bits;
+       u64 raw_event_mask;
        u8 version;
        struct kvm_pmc gp_counters[INTEL_PMC_MAX_GENERIC];
 -      struct kvm_pmc fixed_counters[INTEL_PMC_MAX_FIXED];
 +      struct kvm_pmc fixed_counters[KVM_PMC_MAX_FIXED];
        struct irq_work irq_work;
        DECLARE_BITMAP(reprogram_pmi, X86_PMC_IDX_MAX);
        DECLARE_BITMAP(all_valid_pmc_idx, X86_PMC_IDX_MAX);

我认为这里不应该有 diff 的输出,而且这个 diff 的输出我完全看不出有什么意义。

1418 次点击
所在节点    git
3 条回复
wynemo
2022-05-11 13:40:18 +08:00
这个是不是处理 merge 冲突产生的
Defined
2022-05-11 14:48:16 +08:00
处理冲突时候的改动
aleen42
2022-05-14 09:42:37 +08:00
沒規定說 merge commit 不能有任何變更

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/852156

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX