public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@intel.com
Subject: [dim PATCH v2 6/7] dim: check positional parameter on dim fixes and cite
Date: Thu, 24 Nov 2016 17:32:39 +0200	[thread overview]
Message-ID: <1480001560-18790-6-git-send-email-jani.nikula@intel.com> (raw)
In-Reply-To: <1480001560-18790-1-git-send-email-jani.nikula@intel.com>

Signed-off-by: Jani Nikula <jani.nikula@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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2016-11-24 15:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-24 15:32 [dim PATCH v2 1/7] dim: rename rebuild-nightly to rebuild-tip Jani Nikula
2016-11-24 15:32 ` [dim PATCH v2 2/7] dim: fix references to anything "nightly" in dim and documentation Jani Nikula
2016-11-24 15:32 ` [dim PATCH v2 3/7] dim: do not do local variable assignments in declaration Jani Nikula
2016-11-24 15:37   ` Jani Nikula
2016-11-24 15:32 ` [dim PATCH v2 4/7] dim: return exit status instead of actually exiting from url_to_remote Jani Nikula
2016-11-24 15:32 ` [dim PATCH v2 5/7] dim: fix list-upstreams when not in a git repo or with a drm upstream in place Jani Nikula
2016-11-24 15:32 ` Jani Nikula [this message]
2016-11-24 15:32 ` [dim PATCH v2 7/7] dim: unify rebuild fetch/merge messages Jani Nikula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1480001560-18790-6-git-send-email-jani.nikula@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox