Текущий результат составляет всего ~15 МБ для предположительно Android 15 ядра Linux 6.6 LTS.
Пример
Код: Выделить всё
$ ls -lA '~/.local/exec-scripts/';
total 4
-rwxrwxr-x 1 user user 927 Jan 25 13:20 git-file-size-diff.sh
Код: Выделить всё
$ export PATH="${PATH}${PATH:+:}${HOME}/.local/exec-scripts";
$ git log;
commit 5fa4793a2d2d70ad08b85387b41020f1fcc2d19e (grafted, HEAD)
Author: Greg Kroah-Hartman
Date: Sun Dec 7 06:18:54 2025 +0900
Linux 6.6.119
Link: https://lore.kernel.org/r/20251203152336.494201426@linuxfoundation.org
Tested-by: Florian Fainelli
Tested-by: Hardik Garg
Tested-by: Shuah Khan
Tested-by: Peter Schneider
Tested-by: Jon Hunter
Tested-by: Ron Economos
Tested-by: Mark Brown
Tested-by: Linux Kernel Functional Testing
Tested-by: Miguel Ojeda
Tested-by: Brett A C Sheffield
Signed-off-by: Greg Kroah-Hartman
$ git remote show origin;
* remote origin
Fetch URL: https://android.googlesource.com/kernel/common
Push URL: https://android.googlesource.com/kernel/common
HEAD branch: android-mainline
Remote branch:
android15-6.6-lts tracked
Local branch configured for 'git pull':
android15-6.6-lts merges with remote android15-6.6-lts
Local ref configured for 'git push':
android15-6.6-lts pushes to android15-6.6-lts (up to date)
Код: Выделить всё
$ git reflog;
5fa4793a2 (grafted, HEAD) HEAD@{0}: checkout: moving from android15-6.6-lts to 5fa4793a2d2d70ad08b85387b41020f1fcc2d19e
dda2fd289 (grafted, origin/android15-6.6-lts, android15-6.6-lts) HEAD@{1}: clone: from https://android.googlesource.com/kernel/common
$ git file-size-diff.sh 5fa4793a2 dda2fd289;
# ...
Total: 15873439 bytes ( 15.14MiB)
Код: Выделить всё
git-file-size-diff.shКод: Выделить всё
# Modified by Serious Angel on 2026-01-25
# Source - https://stackoverflow.com/a/10847242/5113030
# Posted by patthoyts, modified by community. See post 'Timeline' for change history
# Retrieved 2026-01-25, License - CC BY-SA 4.0
#!/bin/bash
USAGE='[--cached] [...]
Show file size changes between two commits or the index and a commit.'
SUBDIRECTORY_OK=1
. "$(git --exec-path)/git-sh-setup"
args=$(git rev-parse --sq "$@")
[ -n "$args" ] || usage
cmd="diff-tree -r"
[[ $args =~ "--cached" ]] && cmd="diff-index"
eval "git $cmd $args" | {
total=0
while read A B C D M P
do
case $M in
M) bytes=$(( $(git cat-file -s $D) - $(git cat-file -s $C) )) ;;
A) bytes=$(git cat-file -s $D) ;;
D) bytes=-$(git cat-file -s $C) ;;
*)
echo >&2 warning: unhandled mode $M in \"$A $B $C $D $M $P\"
continue
;;
esac
total=$(( $total + $bytes ))
printf '%d\t%s\n' $bytes "$P"
done
printf 'Total: %s bytes (%s)\n' "$total" "$( numfmt --to=iec-i --suffix=B --format="%9.2f" "$total"; )";
}
- 5fa4793a2d2d70ad08b85387b41020f1fcc2d19e
Если это так, следует ли нам рассматривать следующий коммит как просто обновление для Android 15, если описанный выше подход действителен?:
- dda2fd289b8daa0d02c9b82111414ce3ddbfd261
Мне вообще интересно, возможно ли это. В следующем ответе, найденном на StachExchange, не указана возможность расчета размера «патча»: различия в патчах между ядром Android и ядром ванильного Linux.
Подробнее здесь: https://stackoverflow.com/questions/798 ... nd-android
Мобильная версия