Re: [GIT PULL] arm64: Fixes for -rc4

From: Uwe Kleine-König
Date: Tue Oct 22 2019 - 04:16:32 EST


Hello,

I added the git list to Cc:. For the new readers: The context of this
thread can be found at
20191017234348.wcbbo2njexn7ixpk@willie-the-truck/">https://lwn.net/ml/linux-kernel/20191017234348.wcbbo2njexn7ixpk@willie-the-truck/

On Mon, Oct 21, 2019 at 08:46:58AM +0200, Ingo Molnar wrote:
> Anyway, a small Git feature request: it would be super useful if "git
> request-pull" output was a bit more dependable and at least warned about
> this and didn't include what is, from the viewpoint of the person doing
> the merge, a bogus diffstat. (Generating the correct diffstat is probably
> beyond request-pull's abilities: it would require changing the working
> tree to actually perform the merge - while request-pull is a read-only
> operation right now. But detecting the condition and warning about it
> should be possible?)

I think Will's case is still an easy one compared with what could
actually happen.

The related history looks as follows:

,-. ,-. ,-. ,-. ,-.
v5.4-rc1 --| |-...-| |-- v5.4-rc2 --| |-..-| |-..-| |-- v5.4-rc3
\ `-' `-' \ `-' /-' `-'
\ ,-. ,-. \ ,-/ ,-. ,-.
`--| |-...-| |--------------------|*|----| |-...-|H|
`-' `-' \ `-' `-' /-'
\ ,-. ,-. /
`--| |-...-| |-----'
`-' `-'

Will asked Linus to merge the Commit marked 'H', the two merge bases are
v5.4-rc2 and '*'.

(FTR:
* = 3e7c93bd04edfb0cae7dad1215544c9350254b8f
H = 777d062e5bee0e3c0751cdcbce116a76ee2310ec
, they can be found in
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git)

The formally correct way to create the diffstat is to merge v5.4-rc2 and
'*' (in general: all merge bases) and calculate the diff between this
merge and the to-be-merged-commit. Compared to what Will did (i.e. merge
Linus' HEAD and this branch and then diff @~ with @) doing it the way I
described has the advantage(?) that commits that conflict with this
merge request in Linus' tree since the merge bases are not in the way.

In this case this can be done automatically:

$ git read-tree --index-output=tralala v5.4-rc2 3e7c93bd04edfb0cae7dad1215544c9350254b8f
$ GIT_INDEX=tralala git write-tree
6a2acfd1870d9da3c330ea9b648a7e858b5ee39f
$ git diff --stat 6a2acfd1870d9da3c330ea9b648a7e858b5ee39f 777d062e5bee0e3c0751cdcbce116a76ee2310ec
Documentation/arm64/silicon-errata.rst | 2 ++
arch/arm64/Kconfig | 17 ++++++++++++++
arch/arm64/include/asm/asm-uaccess.h | 7 +++---
arch/arm64/include/asm/cpucaps.h | 4 +++-
arch/arm64/include/asm/memory.h | 10 ++++++--
arch/arm64/include/asm/pgtable.h | 3 ---
arch/arm64/include/asm/sysreg.h | 2 +-
arch/arm64/kernel/cpu_errata.c | 38 +++++++++++++++++++++++++++++++
arch/arm64/kernel/cpufeature.c | 15 ++++++++----
arch/arm64/kernel/entry.S | 8 ++++---
arch/arm64/kernel/hibernate.c | 9 +++++++-
arch/arm64/kernel/process.c | 18 +++++++++++++++
arch/arm64/kvm/hyp/switch.c | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--
arch/arm64/mm/fault.c | 6 ++++-
include/linux/sched.h | 1 +
15 files changed, 186 insertions(+), 23 deletions(-)

Would be great if git-request-pull learned to do that.

Best regards
Uwe

--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |