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

Jani Nikula jani.nikula at intel.com
Wed Oct 11 16:08:55 UTC 2017


On Wed, 11 Oct 2017, Daniel Vetter <daniel at ffwll.ch> wrote:
> 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

D'oh! I added the locals in patch 1 exactly because I meant to amend
them here.

Both pushed, thanks for the reviews.

BR,
Jani.

>
> 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

-- 
Jani Nikula, Intel Open Source Technology Center


More information about the dim-tools mailing list