[PATCH 2/2] dim: log git --version in rerere cache commits

Daniel Vetter daniel at ffwll.ch
Wed Oct 11 15:49:33 UTC 2017


On Wed, Oct 11, 2017 at 06:31:28PM +0300, Jani Nikula wrote:
> Make it easier to debug potential issues in rerere cache
> handling. Adding the commit message using a temp file also makes it
> easier to add more breadcrumbs in the future.

Very-much-acked-by: Daniel Vetter <daniel.vetter at ffwll.ch>

> ---
>  dim | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/dim b/dim
> index 4b65eb26f1a1..8dd2e62279cc 100755
> --- a/dim
> +++ b/dim
> @@ -617,11 +617,21 @@ function commit_rerere_cache
>  	done
>  	find rr-cache/ -mtime -1 -type f -not -name "thisimage*" -print0 | xargs -0 git add > /dev/null || true
>  	git rm rr-cache/rr-cache &> /dev/null || true
> -	if git commit -m "$time: $integration_branch rerere cache update" >& /dev/null; then
> +
> +	commit_message=$(mktemp)

Please add commit_message to local ... with that even

Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
-Daniel

> +	cat > $commit_message <<-EOF
> +		$time: $integration_branch rerere cache update
> +
> +		$(git --version)
> +		EOF
> +
> +	if git commit -F $commit_message >& /dev/null; then
>  		echo -n "New commit. "
>  	else
>  		echo -n "Nothing changed. "
>  	fi
> +	rm $commit_message
> +
>  	echo -n "Pushing rerere cache... "
>  	git push $DRY_RUN $remote HEAD >& /dev/null && echo "Done."
>  }
> -- 
> 2.11.0
> 
> _______________________________________________
> dim-tools mailing list
> dim-tools at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dim-tools

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the dim-tools mailing list