diff mbox

[2/2] dim: Stop force-pushing tags

Message ID 20170321090848.9397-2-daniel.vetter@ffwll.ch (mailing list archive)
State New, archived
Headers show

Commit Message

Daniel Vetter March 21, 2017, 9:08 a.m. UTC
It's evil. And if you've catastrophically screwed up a pull request
it's probably better to be forced to wait 1 day.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 dim | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

Comments

Jani Nikula March 21, 2017, 11:44 a.m. UTC | #1
On Tue, 21 Mar 2017, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> It's evil. And if you've catastrophically screwed up a pull request
> it's probably better to be forced to wait 1 day.

I have to disagree with that. When I suggested we stop overwriting tags,
I meant we should check if the tag exists, and add a sequence number at
the end. Or always add HHMM there too.

BR,
Jani.


>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
>  dim | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/dim b/dim
> index 6a5987ac5c53..821147510dc5 100755
> --- a/dim
> +++ b/dim
> @@ -1329,13 +1329,13 @@ function dim_update_next_continue
>  
>  	git push $DRY_RUN -f $DIM_DRM_INTEL_REMOTE drm-intel-next-queued:drm-intel-next
>  	tag=drm-intel-next-$today
> -	$DRY git tag -f -a $tag $DIM_DRM_INTEL_REMOTE/drm-intel-next
> -	git push $DRY_RUN -f $DIM_DRM_INTEL_REMOTE $tag
> +	$DRY git tag -a $tag $DIM_DRM_INTEL_REMOTE/drm-intel-next
> +	git push $DRY_RUN $DIM_DRM_INTEL_REMOTE $tag
>  
>  	echo "Updating drm-intel-testing to latest drm-tip"
>  	git push $DRY_RUN $DIM_DRM_INTEL_REMOTE +$remote/drm-tip:drm-intel-testing
> -	$DRY git tag -f drm-intel-testing-$today $DIM_DRM_INTEL_REMOTE/drm-intel-testing
> -	$DRY git push -f $DIM_DRM_INTEL_REMOTE drm-intel-testing-$today
> +	$DRY git tag drm-intel-testing-$today $DIM_DRM_INTEL_REMOTE/drm-intel-testing
> +	$DRY git push $DIM_DRM_INTEL_REMOTE drm-intel-testing-$today
>  
>  	cat > ~/tmp/test-request <<-HERE
>  		Hi all,
> @@ -1371,8 +1371,8 @@ function dim_tag_next
>  		echo "Tagging current drm-intel-next"
>  
>  		tag=drm-intel-next-$today
> -		$DRY git tag -f $tag $DIM_DRM_INTEL_REMOTE/drm-intel-next
> -		git push $DRY_RUN -f $DIM_DRM_INTEL_REMOTE $tag
> +		$DRY git tag $tag $DIM_DRM_INTEL_REMOTE/drm-intel-next
> +		git push $DRY_RUN $DIM_DRM_INTEL_REMOTE $tag
>  	else
>  		echo "drm-intel-next not up-to-date, aborting"
>  		exit
> @@ -1413,8 +1413,8 @@ function dim_pull_request
>  	else
>  		tag=$branch-$today
>  		gitk "$branch@{upstream}" ^$upstream &
> -		$DRY git tag -f -a $tag "$branch@{upstream}"
> -		$DRY git push -f $remote $tag
> +		$DRY git tag -a $tag "$branch@{upstream}"
> +		$DRY git push $remote $tag
>  		prep_pull_mail $tag
>  
>  		repo=$(branch_to_repo $branch)
diff mbox

Patch

diff --git a/dim b/dim
index 6a5987ac5c53..821147510dc5 100755
--- a/dim
+++ b/dim
@@ -1329,13 +1329,13 @@  function dim_update_next_continue
 
 	git push $DRY_RUN -f $DIM_DRM_INTEL_REMOTE drm-intel-next-queued:drm-intel-next
 	tag=drm-intel-next-$today
-	$DRY git tag -f -a $tag $DIM_DRM_INTEL_REMOTE/drm-intel-next
-	git push $DRY_RUN -f $DIM_DRM_INTEL_REMOTE $tag
+	$DRY git tag -a $tag $DIM_DRM_INTEL_REMOTE/drm-intel-next
+	git push $DRY_RUN $DIM_DRM_INTEL_REMOTE $tag
 
 	echo "Updating drm-intel-testing to latest drm-tip"
 	git push $DRY_RUN $DIM_DRM_INTEL_REMOTE +$remote/drm-tip:drm-intel-testing
-	$DRY git tag -f drm-intel-testing-$today $DIM_DRM_INTEL_REMOTE/drm-intel-testing
-	$DRY git push -f $DIM_DRM_INTEL_REMOTE drm-intel-testing-$today
+	$DRY git tag drm-intel-testing-$today $DIM_DRM_INTEL_REMOTE/drm-intel-testing
+	$DRY git push $DIM_DRM_INTEL_REMOTE drm-intel-testing-$today
 
 	cat > ~/tmp/test-request <<-HERE
 		Hi all,
@@ -1371,8 +1371,8 @@  function dim_tag_next
 		echo "Tagging current drm-intel-next"
 
 		tag=drm-intel-next-$today
-		$DRY git tag -f $tag $DIM_DRM_INTEL_REMOTE/drm-intel-next
-		git push $DRY_RUN -f $DIM_DRM_INTEL_REMOTE $tag
+		$DRY git tag $tag $DIM_DRM_INTEL_REMOTE/drm-intel-next
+		git push $DRY_RUN $DIM_DRM_INTEL_REMOTE $tag
 	else
 		echo "drm-intel-next not up-to-date, aborting"
 		exit
@@ -1413,8 +1413,8 @@  function dim_pull_request
 	else
 		tag=$branch-$today
 		gitk "$branch@{upstream}" ^$upstream &
-		$DRY git tag -f -a $tag "$branch@{upstream}"
-		$DRY git push -f $remote $tag
+		$DRY git tag -a $tag "$branch@{upstream}"
+		$DRY git push $remote $tag
 		prep_pull_mail $tag
 
 		repo=$(branch_to_repo $branch)