[PATCH v3 1/2] dim: Factorise the tag push into tag_branch
Maxime Ripard
maxime at cerno.tech
Wed Nov 13 14:24:33 UTC 2019
From: Maxime Ripard <mripard at kernel.org>
All the users of tag_branch do a push for the created tag as the very next
step. Let's move that into the tag_branch function.
Signed-off-by: Maxime Ripard <mripard at kernel.org>
---
Changes from v2:
- None
Changes from v1:
- Switch to git_push
---
dim | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/dim b/dim
index 70262b60d513..0b1cd042345f 100755
--- a/dim
+++ b/dim
@@ -1957,12 +1957,14 @@ function tag_summary # branch
function tag_branch
{
- local tag branch
+ local remote tag branch
tag=$1
branch=$2
+ remote=$(branch_to_remote $branch)
tag_summary $branch | $DRY git tag -F- $tag "$branch@{upstream}"
$DRY git tag -a $DIM_GPG_KEYID -f $tag
+ git_push $remote $tag
}
# $1: commit subject prefix
@@ -2010,7 +2012,6 @@ function dim_update_next_continue
tag=$(tag_name "drm-intel-next")
tag_branch $tag drm-intel-next
- git_push $remote $tag
}
function dim_tag_branch
@@ -2045,7 +2046,6 @@ function dim_tag_branch
tag=$(tag_name "$branch")
tag_branch $tag $branch
- git_push $remote $tag
}
function dim_tag_next
@@ -2084,7 +2084,6 @@ function dim_pull_request
tag=$(tag_name "$branch")
gitk --first-parent "$branch" ^$upstream &
tag_branch $tag $branch
- git_push $remote $tag
prep_pull_mail $req_file $tag
repo=$(branch_to_repo $branch)
--
2.23.0
More information about the dim-tools
mailing list