Re: [PATCH 2/3] Move copy_note_for_rewrite + friends from builtin/notes.c to notes-utils.c
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 12, 2013, 20:02 UTC
- Message-ID
- <7v7ghz2j3s.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <1370995981-1553-3-git-send-email-johan@herland.net>
Johan Herland <johan@herland.net> writes:
Show 24 quoted lines
> This is a pure code movement of the machinery for copying notes to > rewritten objects. This code was located in builtin/notes.c for > historical reasons. In order to make it available to builtin/commit.c > it was declared in builtin.h. This was more of an accident of history > than a concious design, and we now want to make this machinery more > widely available. > > Hence, this patch moves the code into the new notes-utils.[hc] files > which are included into libgit.a. Except for adjusting #includes > accordingly, this patch merely moves the relevant functions verbatim > into the new files. > > Cc: Thomas Rast <trast@inf.ethz.ch> > Signed-off-by: Johan Herland <johan@herland.net> > --- > Makefile | 2 + > builtin.h | 16 ------- > builtin/commit.c | 1 + > builtin/notes.c | 131 +----------------------------------------------------- > notes-utils.c | 132 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ > notes-utils.h | 23 ++++++++++ > 6 files changed, 159 insertions(+), 146 deletions(-) > create mode 100644 notes-utils.c > create mode 100644 notes-utils.h
Output from "git show -C1 --stat" after applying this patch shows mostly removals (i.e. builtin/notes.c loses what was lifted from it, notes-utils.c starts its life as a copy of the former and the patch shows removal of what should not move to notes-utils.c). After inspecting "added" lines to these two files, I did not spot anything suspicious, except for one C++/C99 comment (will locally touch-up).
Thanks.