[Intel-gfx] [dim PATCH 7/7] dim: check positional parameter on dim fixes and cite
Jani Nikula
jani.nikula at intel.com
Thu Nov 24 11:20:40 UTC 2016
Signed-off-by: Jani Nikula <jani.nikula at intel.com>
---
dim | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/dim b/dim
index fc0bc8e68d2b..8388a57a2ff3 100755
--- a/dim
+++ b/dim
@@ -1413,6 +1413,11 @@ function dim_cite
local sha1
sha1=$1
+ if [[ -z "$sha1" ]]; then
+ echoerr "usage: $dim $subcommand <commit-ish>"
+ return 1
+ fi
+
cd $DIM_PREFIX/$DIM_DRM_INTEL
git log -1 $sha1 "--pretty=format:%H (\"%s\")%n" | \
@@ -1423,9 +1428,13 @@ function dim_fixes
{
local sha1 tag
- cd $DIM_PREFIX/$DIM_DRM_INTEL
sha1=$1
+ if [[ -z "$sha1" ]]; then
+ echoerr "usage: $dim $subcommand <commit-ish>"
+ return 1
+ fi
+ cd $DIM_PREFIX/$DIM_DRM_INTEL
echo "Fixes: $(dim_cite $sha1)"
(
--
2.1.4
More information about the Intel-gfx
mailing list