Skip to content

@{u} updates

Junio C Hamano git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2t1506: more test for @{upstream} syntaxt/t1506-rev-parse-upstream.sh+41 -014 replies
2/2Teach @{upstream} syntax to strbuf_branchanme()sha1_name.c t/t1506-rev-parse-upstream.sh+77 -450 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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(-)