From: Lawrence Siebert <lawrencesiebert@gmail.com>
To: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Cc: git@vger.kernel.org,
Remi Galan Alfonso <remi.galan-alfonso@ensimag.grenoble-inp.fr>,
Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH v2 3/4] log --count: added test
Date: Fri, 3 Jul 2015 01:30:44 -0700 [thread overview]
Message-ID: <CAKDoJU7MT5PkoPKaF=NYne0sgNfGC6q+y7+57L0135dgxKThgw@mail.gmail.com> (raw)
In-Reply-To: <vpqwpyh4rup.fsf@anie.imag.fr>
Matthieu,
Ok, I'll fix that. I think I can also add tests, I can look at the
tests for rev-list --count, with the understanding that I saw somebody
else had made changes for the --use-bitmap-index option, and I am
basing off of master for this, and thus don't feel comfortable with
--use-bitmap-index at this time.
If it's acceptable practice, I'll just squash everything I do on this
feature and it's tests into one commit with a more detailed comment,
and send the patch for that. I wasn't sure about how much history I
should save, and how much I should split stuff up, so I appreciate
your clarification.
Thank you for your time,
Lawrence Siebert
On Fri, Jul 3, 2015 at 12:34 AM, Matthieu Moy
<Matthieu.Moy@grenoble-inp.fr> wrote:
> Lawrence Siebert <lawrencesiebert@gmail.com> writes:
>
>> added test comparing output between git log --count HEAD and
>> git rev-list --count HEAD
>
> Unless there is a very long list of tests, I'd rather see this squashed
> with PATCH 2/4. As a reviewer I prefer having code and tests in the same
> place.
>
>> Signed-off-by: Lawrence Siebert <lawrencesiebert@gmail.com>
>> ---
>> t/t4202-log.sh | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/t/t4202-log.sh b/t/t4202-log.sh
>> index 1b2e981..35f8d82 100755
>> --- a/t/t4202-log.sh
>> +++ b/t/t4202-log.sh
>> @@ -871,4 +871,11 @@ test_expect_success 'log --graph --no-walk is forbidden' '
>> test_must_fail git log --graph --no-walk
>> '
>>
>> +test_expect_success 'log --count' '
>> + git log --count HEAD > actual &&
>> + git rev-list --count HEAD > expect &&
>
> The weird space is still there.
>
> Also, we write ">actual", not "> actual" in the Git coding style.
>
> That is actually a rather weak test. rev-list --count interacts with
> --left-right, so I guess you want to test --count --left-right.
>
> Also, some revision-limiting options can reduce the count like
>
> git log --grep whatever
>
> and you should check that you actually count the right number here.
>
> (I don't know this part of the code enough, but I'm not sure you
> actually deal with this properly)
>
> --
> Matthieu Moy
> http://www-verimag.imag.fr/~moy/
--
About Me: http://about.me/lawrencesiebert
Constantly Coding: http://constantcoding.blogspot.com
next prev parent reply other threads:[~2015-07-03 8:31 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-02 23:50 [PATCH v2 0/4] git log --count Lawrence Siebert
2015-07-02 23:50 ` [PATCH v2 1/4] list-object: add get_commit_count function Lawrence Siebert
2015-07-03 7:24 ` Matthieu Moy
2015-07-03 8:09 ` Lawrence Siebert
2015-07-03 8:59 ` Matthieu Moy
2015-07-02 23:50 ` [PATCH v2 2/4] log: add --count option to git log Lawrence Siebert
2015-07-03 7:29 ` Matthieu Moy
2015-07-03 8:05 ` Lawrence Siebert
2015-07-03 9:16 ` Matthieu Moy
2015-07-02 23:50 ` [PATCH v2 3/4] log --count: added test Lawrence Siebert
2015-07-03 7:34 ` Matthieu Moy
2015-07-03 8:30 ` Lawrence Siebert [this message]
2015-07-03 9:16 ` Matthieu Moy
2015-07-03 9:54 ` Matthieu Moy
2015-07-04 0:57 ` Junio C Hamano
2015-07-04 0:54 ` Junio C Hamano
2015-07-02 23:50 ` [PATCH v2 4/4] git-log: update man documentation for --count Lawrence Siebert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAKDoJU7MT5PkoPKaF=NYne0sgNfGC6q+y7+57L0135dgxKThgw@mail.gmail.com' \
--to=lawrencesiebert@gmail.com \
--cc=Matthieu.Moy@grenoble-inp.fr \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=remi.galan-alfonso@ensimag.grenoble-inp.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).