[Intel-gfx] [maintainer-tools RFC PATCH 01/17] dim: rename dim_push to dim_push_branch
Jani Nikula
jani.nikula at intel.com
Tue Jan 26 06:32:14 PST 2016
Rename to match the subcommand name. Move error checking to the function
too.
Signed-off-by: Jani Nikula <jani.nikula at intel.com>
---
dim | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/dim b/dim
index c749cebd1187..dbb69d993c44 100755
--- a/dim
+++ b/dim
@@ -346,8 +346,13 @@ function update_nightly
# push branch $1, rebuild nightly. the rest of the arguments are passed to git
# push.
-function dim_push
+function dim_push_branch
{
+ if [[ "x$1" = "x" ]]; then
+ echo "usage: $0 $subcommand branch"
+ exit 1
+ fi
+
branch=$1
shift
@@ -763,20 +768,16 @@ case "$subcommand" in
cat > `cat .fixup_file_path`
;;
push-branch)
- if [[ "x$1" = "x" ]]; then
- echo "usage: $0 $subcommand branch"
- exit 1
- fi
- dim_push "$@"
+ dim_push_branch "$@"
;;
push-queued|pq)
- dim_push drm-intel-next-queued "$@"
+ dim_push_branch drm-intel-next-queued "$@"
;;
push-next-fixes|pnf)
- dim_push drm-intel-next-fixes "$@"
+ dim_push_branch drm-intel-next-fixes "$@"
;;
push-fixes|pf)
- dim_push drm-intel-fixes "$@"
+ dim_push_branch drm-intel-fixes "$@"
;;
checkout|co)
if [[ "x$1" = "x" ]]; then
--
2.1.4
More information about the Intel-gfx
mailing list