branch: add '--points-at' option
Add the '--points-at' option provided by 'ref-filter'. The option lets the user to list only branches which points at the given object. Add documentation and tests for the same. Mentored-by: Christian Couder <christian.couder@gmail.com> Mentored-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr> Signed-off-by: Karthik Nayak <karthik.188@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
aedcb7dc75
commit
aa3bc55e40
@@ -154,4 +154,13 @@ test_expect_success 'git branch `--sort` option' '
|
||||
test_i18ncmp expect actual
|
||||
'
|
||||
|
||||
test_expect_success 'git branch --points-at option' '
|
||||
cat >expect <<-\EOF &&
|
||||
branch-one
|
||||
master
|
||||
EOF
|
||||
git branch --points-at=branch-one >actual &&
|
||||
test_cmp expect actual
|
||||
'
|
||||
|
||||
test_done
|
||||
|
||||
Reference in New Issue
Block a user