Re: [PATCH 2/2] files-backend: don't rewrite the `packed-refs` file unnecessarily

2017-10-26 Thread Michael Haggerty
On 10/26/2017 08:46 AM, Junio C Hamano wrote: > Michael Haggerty writes: > >> Even when we are deleting references, we needn't overwrite the >> `packed-refs` file if the references that we are deleting are not >> present in that file. Implement this optimization as follows:

Re: [PATCH 2/2] files-backend: don't rewrite the `packed-refs` file unnecessarily

2017-10-26 Thread Junio C Hamano
Michael Haggerty writes: > Even when we are deleting references, we needn't overwrite the > `packed-refs` file if the references that we are deleting are not > present in that file. Implement this optimization as follows: This goal I can understand.

[PATCH 2/2] files-backend: don't rewrite the `packed-refs` file unnecessarily

2017-10-25 Thread Michael Haggerty
Even when we are deleting references, we needn't overwrite the `packed-refs` file if the references that we are deleting are not present in that file. Implement this optimization as follows: * Add a function `is_packed_transaction_noop()`, which checks whether a given packed-refs transaction