Subject: Re: [PATCH/RFC v2 0/16] Introduce index file format version 5

From: Nguyễn Thái Ngọc Duy <[email-masked]>
Date: Mon, 6 Aug 2012 21:35:58 +0700

These mails are about cosmetics only. But I think it helps maintenance
in long term. I notice in your series we have many functions with _v2
and _v5 mixed together. Worse, some functions that are _v2 only are
not suffixed with _v2. I still think separating v2/v5 changes is a
good idea. So I played a bit, see how it might become.

The next two emails demonstrate how we take v2-specific code out to
read-cache-v2.c, then add v5 code in the next patch. Notice there's very
little change in read-cache.c in the second patch. I wanted to see how
v5 changes affects v2 users and the second patch shows it.

I'm not happy with the first patch either. Ideally it should consist
of code move only, no other changes. All updates in read_index_from
and the introduction of struct index_ops should happen in patches
before that.

Then of course you need to split the second patch into several logical
patches again. We can drop _v5 suffix in read-cache-v5.c (I haven't
done that). When we add partial read/write for v5, we can add more
func pointers to index_ops and implement them in v2 (probably as no-op
or assertion)

There are still some v5 bits in the first patch. This series is not
meant to be used anyway, so it does not matter much. Hope it helps.

Nguyễn Thái Ngọc Duy (2):
  Move index v2 specific code out of read-cache
  Add index-v5

 Makefile        |    3 +
 cache.h         |   92 ++++-
 read-cache-v2.c |  570 +++++++++++++++++++++++++++
 read-cache-v5.c | 1170 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 read-cache.c    |  618 +++---------------------------
 read-cache.h    |   54 +++
 6 files changed, 1932 insertions(+), 575 deletions(-)
 create mode 100644 read-cache-v2.c
 create mode 100644 read-cache-v5.c
 create mode 100644 read-cache.h

-- 
1.7.8