diff options
| author | Sebastian Reichel <[email protected]> | 2023-04-01 22:59:10 +0200 |
|---|---|---|
| committer | Sebastian Reichel <[email protected]> | 2023-04-01 22:59:10 +0200 |
| commit | 9d6ff170b5ee56cf2817cbe91dd0e5e7f9d742dd (patch) | |
| tree | f785f31a780f1fc12bf0fa5845bb837320c01b6e /scripts/package/gen-diff-patch | |
| parent | 7cc7478e093782d2ac176c11a966de00bd0792dc (diff) | |
| parent | e8d018dd0257f744ca50a729e3d042cf2ec9da65 (diff) | |
Merge tag 'v6.3-rc3'
Merge v6.3-rc3, so that 'acpi_quirk_skip_gpio_event_handlers'
is available, which is needed for adding x86 android tablet
support in axp288_charger.
Signed-off-by: Sebastian Reichel <[email protected]>
Diffstat (limited to 'scripts/package/gen-diff-patch')
| -rwxr-xr-x | scripts/package/gen-diff-patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/scripts/package/gen-diff-patch b/scripts/package/gen-diff-patch new file mode 100755 index 000000000000..f842ab50a780 --- /dev/null +++ b/scripts/package/gen-diff-patch @@ -0,0 +1,44 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0-only + +diff_patch="${1}" +untracked_patch="${2}" +srctree=$(dirname $0)/../.. + +rm -f ${diff_patch} ${untracked_patch} + +if ! ${srctree}/scripts/check-git; then + exit +fi + +mkdir -p "$(dirname ${diff_patch})" "$(dirname ${untracked_patch})" + +git -C "${srctree}" diff HEAD > "${diff_patch}" + +if [ ! -s "${diff_patch}" ]; then + rm -f "${diff_patch}" + exit +fi + +git -C ${srctree} status --porcelain --untracked-files=all | +while read stat path +do + if [ "${stat}" = '??' ]; then + + if ! diff -u /dev/null "${srctree}/${path}" > .tmp_diff && + ! head -n1 .tmp_diff | grep -q "Binary files"; then + { + echo "--- /dev/null" + echo "+++ linux/$path" + cat .tmp_diff | tail -n +3 + } >> ${untracked_patch} + fi + fi +done + +rm -f .tmp_diff + +if [ ! -s "${diff_patch}" ]; then + rm -f "${diff_patch}" + exit +fi |