[Intel-gfx] [dim PATCH v2 6/7] dim: check positional parameter on dim fixes and cite
Jani Nikula
jani.nikula at intel.com
Thu Nov 24 15:32:39 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 76e129de873d..69c22f6206f0 100755
--- a/dim
+++ b/dim
@@ -1419,6 +1419,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" | \
@@ -1429,9 +1434,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