@{u} updates
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 10 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | t1506: more test for @{upstream} syntaxt/ | +41 | 14 replies | |
| 2/2 | Teach @{upstream} syntax to strbuf_branchanme()sha1_name.c t/ | +77 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] @{u} updates
Earlier I wondered if the approach Dscho's patch takes to teach the new @{upstream} syntax to substitute_branch_name() (hence dwim_ref()) without teaching it to interpret_branch_name() (hence strbuf_branchname()) was a bad idea. I thought about this a bit more; there are some downsides for not doing so.
The first patch adds a handful of tests that show why strbuf_branchname() callers may also want to learn about the new syntax. The second patch moves the logic to interpret_branch_name() to make them happier.
The name of the key function was changed from tracked_suffix() to upstream_mark(), not only because the syntax talks about @{upstream}, but because the parsing needs to recognize the @{u}/@{upstream} mark at the beginning of the given string (that is a suffix to some other string), and strip it (the earlier code wanted @{u} to be at the very end but the callers need to have it at the beginning).
Junio C Hamano (2):
t1506: more test for @{upstream} syntax
Teach @{upstream} syntax to strbuf_branchanme()
sha1_name.c | 116 ++++++++++++++++++++++++++--------------- t/t1506-rev-parse-upstream.sh | 41 ++++++++++++++ 2 files changed, 115 insertions(+), 42 deletions(-)