android_kernel_samsung_a7y1.../scripts
Brian Norris bc4212d998 scripts/setlocalversion: Improve -dirty check with git-status --no-optional-locks
[ Upstream commit ff64dd4857303dd5550faed9fd598ac90f0f2238 ]

git-diff-index does not refresh the index for you, so using it for a
"-dirty" check can give misleading results. Commit 6147b1cf19651
("scripts/setlocalversion: git: Make -dirty check more robust") tried to
fix this by switching to git-status, but it overlooked the fact that
git-status also writes to the .git directory of the source tree, which
is definitely not kosher for an out-of-tree (O=) build. That is getting
reverted.

Fortunately, git-status now supports avoiding writing to the index via
the --no-optional-locks flag, as of git 2.14. It still calculates an
up-to-date index, but it avoids writing it out to the .git directory.

So, let's retry the solution from commit 6147b1cf19651 using this new
flag first, and if it fails, we assume this is an older version of git
and just use the old git-diff-index method.

It's hairy to get the 'grep -vq' (inverted matching) correct by stashing
the output of git-status (you have to be careful about the difference
betwen "empty stdin" and "blank line on stdin"), so just pipe the output
directly to grep and use a regex that's good enough for both the
git-status and git-diff-index version.

Cc: Christian Kujau <lists@nerdbynature.de>
Cc: Guenter Roeck <linux@roeck-us.net>
Suggested-by: Alexander Kapshuk <alexander.kapshuk@gmail.com>
Signed-off-by: Brian Norris <briannorris@chromium.org>
Tested-by: Genki Sky <sky@genki.is>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-04-07 09:27:28 +02:00
..
basic A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
coccinelle fs: stream_open - opener for stream-like files so that read and write can run simultaneously without deadlock 2020-04-06 18:47:45 +02:00
dtbtool_exynos Introduce Exynos dtbtool to the Linux build system 2020-03-27 22:20:07 +05:30
dtc A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fmp A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
gdb A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
genksyms A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
kconfig kconfig/[mn]conf: handle backspace (^H) key 2020-04-06 16:41:44 +02:00
ksymoops A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mod modpost: file2alias: check prototype of handler 2020-04-06 15:49:11 +02:00
package A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
selinux A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
tracing A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
analyze_suspend.py A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
android-major-version.sh A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
android-version.sh A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
asn1_compiler.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bloat-o-meter A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bootgraph.pl A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
check_extable.sh A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
check-lc_ctype.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
checkincludes.pl A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
checkkconfigsymbols.py A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
checkpatch.pl A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
checkstack.pl scripts/checkstack.pl: Fix arm64 wrong or unknown architecture 2020-04-06 19:16:34 +02:00
checksyscalls.sh A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
checkversion.pl A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
clang-android.sh A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cleanfile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cleanpatch A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
coccicheck A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
config A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
conmakehash.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
decode_stacktrace.sh scripts/decode_stacktrace: match basepath using shell prefix operator, not regex 2020-04-06 21:34:57 +02:00
decodecode A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
depmod.sh A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
diffconfig A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
docproc.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
export_report.pl A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
extract-cert.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
extract-ikconfig A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
extract-module-sig.pl A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
extract-sys-certs.pl A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
extract-vmlinux A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
find_matching_major.sh A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
find_matching_version.sh A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fips_fmp_hmac.sh A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fips_fmp_utils.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fips_kaslr_fmp_hmac.sh A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
gcc-goto.sh A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
gcc-ld A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
gcc-version.sh A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
gcc-x86_32-has-stack-protector.sh A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
gcc-x86_64-has-stack-protector.sh A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
gen_initramfs_list.sh A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
get_dvb_firmware A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
get_maintainer.pl A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
gfp-translate A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
headerdep.pl A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
headers_check.pl A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
headers_install.sh A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
headers.sh A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
kallsyms.c kallsyms: exclude kasan local symbols on s390 2020-04-06 20:06:26 +02:00
kaslr_fips_fmp.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
kaslr_patch.sh A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kbuild.include kbuild: simplify ld-option implementation 2020-04-06 16:38:00 +02:00
kernel-doc A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
kernel-doc-xml-ref A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ld-version.sh A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Lindent A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
link-vmlinux.sh A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile Introduce Exynos dtbtool to the Linux build system 2020-03-27 22:20:07 +05:30
Makefile.asm-generic A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile.build A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile.clean A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile.dtbinst A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile.extrawarn A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile.fwinst A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile.headersinst A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile.help A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile.host A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile.kasan A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile.lib Introduce Exynos dtbtool to the Linux build system 2020-03-27 22:20:07 +05:30
Makefile.modbuiltin A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile.modinst A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile.modpost kbuild: modpost: handle KBUILD_EXTRA_SYMBOLS only for external modules 2020-04-06 20:49:10 +02:00
Makefile.modsign A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
makelst A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
markup_oops.pl A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mkcompile_h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mkmakefile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mksysmap A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mkuboot.sh A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mkversion A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
module-common.lds A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
namespace.pl namespace: fix namespace.pl script to support relative paths 2020-04-07 09:24:14 +02:00
objdiff A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
patch-kernel A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pnmtologo.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
profile2linkerlist.pl A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
recordmcount.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
recordmcount.h recordmcount: Fix spurious mcount entries on powerpc 2020-04-06 20:06:14 +02:00
recordmcount.pl A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
replace_dir.sh A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
setlocalversion scripts/setlocalversion: Improve -dirty check with git-status --no-optional-locks 2020-04-07 09:27:28 +02:00
show_delta A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sign-file.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sortextable.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sortextable.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spelling.txt A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
stackdelta A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
stackusage A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
tags.sh A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
unifdef.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ver_linux A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
xen-hypercalls.sh A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
xz_wrap.sh A750FXXU4CTBC 2020-03-27 21:51:54 +05:30