GIT=no
DUPHEAD=no
+# Save the original arguments in case we want to put them in
+# a git commit message, quoted for the shell so that we handle
+# args with spaces/metacharacters correctly.
+# The quote_sh() function is the same one we use in configure.
+
+quote_sh() {
+ printf "%s" "$1" | sed "s,','\\\\'',g; s,.*,'&',"
+}
+
+quote_args() {
+ while [ $# -gt 0 ]; do
+ printf "%s" "$(quote_sh "$1")"
+ shift
+ if [ $# -gt 0 ]; then
+ printf " "
+ fi
+ done
+}
+
+QUOTEDARGS="$(quote_args "$@")"
while true
do
git commit --signoff -F - <<EOF
$GITSUBJ: Clean up includes
-This commit was created with scripts/clean-includes.
+This commit was created with scripts/clean-includes:
+ ./scripts/clean-includes $QUOTEDARGS
All .c should include qemu/osdep.h first. The script performs three
related cleanups: