Re: [PATCH v5 0/8] port the filtering part of branch.c to use ref-filter APIs
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Sep 20, 2015, 19:00 UTC
- Message-ID
- <vpqwpvkgblz.fsf@anie.imag.fr>
- In-Reply-To
- <1442772627-25421-1-git-send-email-Karthik.188@gmail.com>
Karthik Nayak <karthik.188@gmail.com> writes:
Show 12 quoted lines
> --- a/t/t3203-branch-output.sh > +++ b/t/t3203-branch-output.sh > @@ -145,8 +145,8 @@ EOF > > test_expect_success 'git branch `--sort` option' ' > cat >expect <<-\EOF && > - * (HEAD detached from fromtag) > branch-two > + * (HEAD detached from fromtag) > branch-one > master > EOF
I thought this was obviously wrong, but this tests uses --sort=objectsize, so it's OK. Indeed, HEAD and branch-one have objectsize=215, and branch-two has objectsize=167.
So, the previous code was hardcoding "detached HEAD always comes first", but we now sort the whole list, including detached HEAD, so branch-two comes first.
-- Matthieu Moy http://www-verimag.imag.fr/~moy/