Re: [PATCH 07/23] ref_store: take `logmsg` parameter when deleting references
- From
Jeff King <peff@peff.net>
- Date
- May 17, 2017, 13:12 UTC
- Message-ID
- <20170517131204.m564xy7i3ywietsl@sigill.intra.peff.net>
- In-Reply-To
- <b26ccc03a7e72dfa30467db81e9210dd621516e2.1495014840.git.mhagger@alum.mit.edu>
On Wed, May 17, 2017 at 02:05:30PM +0200, Michael Haggerty wrote:
Show 17 quoted lines
> Just because the files backend can't retain reflogs for deleted > references is no reason that they shouldn't be supported by the > virtual method interface. Let's add them now before the interface > becomes truly polymorphic and increases the work. > > Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> > --- > builtin/fetch.c | 2 +- > builtin/remote.c | 4 ++-- > refs.c | 11 ++++++----- > refs.h | 12 +++++++----- > refs/files-backend.c | 4 ++-- > refs/refs-internal.h | 2 +- > t/helper/test-ref-store.c | 3 ++- > t/t1405-main-ref-store.sh | 2 +- > t/t1406-submodule-ref-store.sh | 2 +- > 9 files changed, 23 insertions(+), 19 deletions(-)
Having carried a similar patch in GitHub's fork for many years (because we maintain an audit log of all ref updates), I expected this to be bigger. But I forgot that we did 755b49ae9 (delete_ref: accept a reflog message argument, 2017-02-20) a few months ago, which already hit most of the ref-deleting callers. This is just making the plural delete_refs() interface match.
I think your reasoning above is sound by itself, but that gives an added interface: we are making the delete_ref() and delete_refs() interfaces consistent.
-Peff