Consolidate ref parsing code
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 6 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | strbuf.c: keep errno in strbuf_read_file()strbuf.c | +5 | 2 replies | |
| 2/4 | refs.c: refactor resolve_ref_unsafe() to use strbuf internallycache.h refs.c | +68 | 2 replies | |
| 3/4 | refs.c: move ref parsing code out of resolve_ref()cache.h refs.c | +120 | 2 replies | |
| 4/4 | refs.c: rewrite resolve_gitlink_ref() to use parse_ref()refs.c | +26 | 0 replies |
Reviews trailers per patch
1 of 4 patches has a Reviewed-by or Acked-by.
| Patch | Michael Haggerty |
|---|---|
| 1/4 | R-b |
| 2/4 | |
| 3/4 | |
| 4/4 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/4] Consolidate ref parsing code
Quoted 5 lines · Junio C Hamano
- .... 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 ofrefs.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(-)
Signature · 1 line
1.9.1.346.ga2b5940