name-rev: do not omit leading components of ref name.
In a repository with mainto/1.0 (to keep maintaining the 1.0.X series) and fixo/1.0 (to keep fixes that apply to both 1.0.X series and upwards) branches, "git-name-rev mainto/1.0" answered just "1.0" making things ambiguous. Show refnames unambiguously like show-branch does. Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
@ -46,14 +46,14 @@ H=$(doit 8 H $A $F)
|
||||
|
||||
test_expect_success 'compute merge-base (single)' \
|
||||
'MB=$(git-merge-base G H) &&
|
||||
expr "$(git-name-rev "$MB")" : "[0-9a-f]* B"'
|
||||
expr "$(git-name-rev "$MB")" : "[0-9a-f]* tags/B"'
|
||||
|
||||
test_expect_success 'compute merge-base (all)' \
|
||||
'MB=$(git-merge-base --all G H) &&
|
||||
expr "$(git-name-rev "$MB")" : "[0-9a-f]* B"'
|
||||
expr "$(git-name-rev "$MB")" : "[0-9a-f]* tags/B"'
|
||||
|
||||
test_expect_success 'compute merge-base with show-branch' \
|
||||
'MB=$(git-show-branch --merge-base G H) &&
|
||||
expr "$(git-name-rev "$MB")" : "[0-9a-f]* B"'
|
||||
expr "$(git-name-rev "$MB")" : "[0-9a-f]* tags/B"'
|
||||
|
||||
test_done
|
||||
|
Reference in New Issue
Block a user