[kernel-team] 01/02: d-k-prerelease, d-k-tag: Add explicit check for untracked files
debian-kernel at lists.debian.org
debian-kernel at lists.debian.org
Tue Jan 24 20:39:01 UTC 2017
This is an automated email from the git hooks/post-receive script.
benh pushed a commit to branch master
in repository kernel-team.
commit e4c9568b5f53ea2e8cfc89c4d03e42eedd077ad4
Author: Ben Hutchings <ben at decadent.org.uk>
Date: Tue Jan 24 20:30:33 2017 +0000
d-k-prerelease, d-k-tag: Add explicit check for untracked files
Currently the status information about untracked files ends up in the
branch name and we fail anyway, but with strange error messages.
---
scripts/d-k-prerelease | 8 ++++++--
scripts/d-k-tag | 8 ++++++--
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/scripts/d-k-prerelease b/scripts/d-k-prerelease
index b76ec43..f203695 100755
--- a/scripts/d-k-prerelease
+++ b/scripts/d-k-prerelease
@@ -5,8 +5,12 @@ if ! git diff --quiet HEAD; then
echo >&2 "E: Working tree has uncommitted changes"
exit 1
fi
-head="$(git status -b --porcelain)"
-head="${head#\#\# }"
+status="$(git status -b --porcelain)"
+if [ "${status%\?\? *}" != "$status" ]; then
+ echo >&2 "E: Working tree has files that are untracked and not ignored"
+ exit 1
+fi
+head="${status#\#\# }"
if [ "$head" = "HEAD (no branch)" ]; then
echo >&2 "E: HEAD is not a branch"
exit 1
diff --git a/scripts/d-k-tag b/scripts/d-k-tag
index 4287146..35db2a8 100755
--- a/scripts/d-k-tag
+++ b/scripts/d-k-tag
@@ -5,8 +5,12 @@ if ! git diff --quiet HEAD; then
echo >&2 "E: Working tree has uncommitted changes"
exit 1
fi
-head="$(git status -b --porcelain)"
-head="${head#\#\# }"
+status="$(git status -b --porcelain)"
+if [ "${status%\?\? *}" != "$status" ]; then
+ echo >&2 "E: Working tree has files that are untracked and not ignored"
+ exit 1
+fi
+head="${status#\#\# }"
if [ "$head" = "HEAD (no branch)" ]; then
echo >&2 "E: HEAD is not a branch"
exit 1
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/kernel-team.git
More information about the Kernel-svn-changes
mailing list