refs.h: add a note about sorting order of for_each_ref_*
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
2269e2a878
commit
adac8115a6
@ -47,6 +47,12 @@ test_expect_success 'for_each_ref(refs/heads/)' '
|
||||
test_cmp expected actual
|
||||
'
|
||||
|
||||
test_expect_success 'for_each_ref() is sorted' '
|
||||
$RUN for-each-ref refs/heads/ | cut -c 42- >actual &&
|
||||
sort actual > expected &&
|
||||
test_cmp expected actual
|
||||
'
|
||||
|
||||
test_expect_success 'resolve_ref(master)' '
|
||||
SHA1=`git -C sub rev-parse master` &&
|
||||
echo "$SHA1 refs/heads/master 0x0" >expected &&
|
||||
|
Reference in New Issue
Block a user