t9402: improve check_end_tree() and check_end_full_tree()
t9402: improve check_end_tree() and check_end_full_tree()

check_end_tree():
- Instead of counting lines using wc in expectCount and cvsCount:
   Sort and compare the files byte by byte with test_cmp,
   which is more exact and easier to debug
- Chain all shell comands together using &&

check_end_full_tree()
- Instead of counting lines using wc in expectCount, cvsCount and gitCount:
   Sort and compare the files byte by byte with test_cmp,
   which is more exact and easier to debug
- Break the test using two conditions anded together with -a
  into to call to test_cmp
- Chain all shell comands together using &&

Signed-off-by: Torsten Bögershausen <955341c97b9d93a23c19524fc0105a6405902afe@web.de>
Signed-off-by: Junio C Hamano <a6723cc3f76163bf7adb636a73ac3b0ceb3e6b9b@pobox.com>

destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git