All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Consolidate ref parsing code
@ 2014-07-25 10:43 Nguyễn Thái Ngọc Duy
  2014-07-25 10:43 ` [PATCH 1/4] strbuf.c: keep errno in strbuf_read_file() Nguyễn Thái Ngọc Duy
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Nguyễn Thái Ngọc Duy @ 2014-07-25 10:43 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Michael Haggerty,
	Nguyễn Thái Ngọc Duy

On Thu, Jul 24, 2014 at 4:16 AM, Junio C Hamano <gitster@pobox.com> wrote:
>  - .... three places now knows what a
>    textual symref looks like (i.e. begins with "ref:", zero or more
>    whitespaces, the target ref and then zero or more trailing
>    whitespaces).  Perhaps we need to consolidate the code further,
>    so that this knowledge does not leak out of refs.c?

I started on top of nd/multiple-work-trees but it conflicts badly with
rs/ref-transaction-0 because this is basically code move. So I think
we should make it a separate topic instead, based on latest 'master'.
Junio, you still hit conflicts when merging this with nd/multiple-work-trees,
but that's simpler to resolve (git_snpath -> strbuf_git_path). I
promise to replace the "ref:" code in checkout.c later when both
topics graduate.

So.. first cut. The end result looks nice.

Nguyễn Thái Ngọc Duy (4):
  strbuf.c: keep errno in strbuf_read_file()
  refs.c: refactor resolve_ref_unsafe() to use strbuf internally
  refs.c: move ref parsing code out of resolve_ref()
  refs.c: rewrite resolve_gitlink_ref() to use parse_ref()

 cache.h  |  12 +++
 refs.c   | 332 ++++++++++++++++++++++++++++++++-------------------------------
 strbuf.c |   7 +-
 3 files changed, 188 insertions(+), 163 deletions(-)

-- 
1.9.1.346.ga2b5940

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-09-26 10:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-25 10:43 [PATCH 0/4] Consolidate ref parsing code Nguyễn Thái Ngọc Duy
2014-07-25 10:43 ` [PATCH 1/4] strbuf.c: keep errno in strbuf_read_file() Nguyễn Thái Ngọc Duy
2014-07-25 15:41   ` Eric Sunshine
2014-09-26 10:30   ` Michael Haggerty
2014-07-25 10:43 ` [PATCH 2/4] refs.c: refactor resolve_ref_unsafe() to use strbuf internally Nguyễn Thái Ngọc Duy
2014-07-25 15:55   ` Eric Sunshine
2014-07-30 19:53     ` Junio C Hamano
2014-07-25 10:43 ` [PATCH 3/4] refs.c: move ref parsing code out of resolve_ref() Nguyễn Thái Ngọc Duy
2014-07-25 16:12   ` Ronnie Sahlberg
2014-07-26  1:50     ` Duy Nguyen
2014-07-25 10:43 ` [PATCH 4/4] refs.c: rewrite resolve_gitlink_ref() to use parse_ref() Nguyễn Thái Ngọc Duy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.