1 #!/bin/sh 2 # SPDX-License-Identifier: GPL-2.0-only 3 4 set -eu 5 6 diff_patch=$1 7 8 mkdir -p "$(dirname "${diff_patch}")" 9 10 git -C "${srctree:-.}" diff HEAD > "${diff_pat 11 12 if [ ! -s "${diff_patch}" ] || 13 [ -z "$(git -C "${srctree:-.}" ls-files --o 14 exit 15 fi 16 17 # The source tarball, which is generated by 'g 18 # you committed in the repository. If you have 19 # it will go into ${diff_patch}. If untracked 20 # source package may not be correct. 21 # 22 # Examples: 23 # - You modified a source file to add #includ 24 # but forgot to add new-header.h 25 # - You modified a Makefile to add 'obj-$(CON 26 # but you forgot to add new-driver.c 27 # 28 # You need to commit them, or at least stage t 29 # 30 # This script does not take care of untracked 31 # introduce additional complexity. Instead, pr 32 # untracked files are found. 33 # If all untracked files are just garbage, you 34 echo >&2 "============================ WARNING 35 echo >&2 "Your working tree has diff from HEAD 36 echo >&2 "Please make sure you did 'git add' f 37 echo >&2 "the source package." 38 echo >&2 "====================================
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.