Signed-off-by: Jani Nikula <[email protected]>
---
 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

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to