From: Jakub Narebski <jnareb@gmail.com>
To: "Sverre Hvammen Johansen" <hvammen@gmail.com>
Cc: "Junio C Hamano" <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH 1/5] New merge tests
Date: Fri, 25 Apr 2008 02:37:35 -0700 (PDT) [thread overview]
Message-ID: <m3tzhqp96h.fsf@localhost.localdomain> (raw)
In-Reply-To: <402c10cd0804232243u700f4f6fv130d69283c40ff1d@mail.gmail.com>
"Sverre Hvammen Johansen" <hvammen@gmail.com> writes:
> Introduce new merge tests for preparation of new features:
>
> --ff=<fast forward option>
> Head reduction
> --ff=only
I think you should describe here _what_ is tested by the new test(s),
and how it is named.
BTW. the test itself is a bit short on comments...
> +create_merge_msgs() {
[...]
> +verify_diff() {
[...]
> +verify_merge() {
[...]
> +verify_head() {
[...]
> +verify_parents() {
It would be nice to have 1 or 2 lines description of those functions,
perhaps with calling convention. See for example comments in
t/test-lib.sh (some of which are in t/README instead ;-).
> +verify_merge() {
> + verify_diff "$2" "$1" "[OOPS] bad merge result" &&
> + if test $(git ls-files -u | wc -l) -gt 0
What are conventions used by other tests? Somehow I doublt is is
"[OOPS]"...
Instead of
if test $(git ls-files -u | wc -l) -gt 0
you should write IMHO
if test -n "$(git ls-files -u)"
or just
if test "$(git ls-files -u)"
[...]
> +test_expect_success 'setup' '
> + git add file &&
> + test_tick &&
> + git commit -m "commit 0" &&
> + git tag c0 &&
> + c0=$(git rev-parse HEAD) &&
[...]
> +'
It would be nice if you have provides, as comment to this step,
ASCII-art graph of commits you want to have created.
BTW. instead of
c0=$(git rev-parse HEAD) &&
you can use
c0=$(git rev-parse c0^{}) &&
or even "c0^{commit}".
[...]
> +test_expect_success 'merge c1 with c0 and c0' '
> + git reset --hard c1 &&
> + git config branch.master.mergeoptions "" &&
Not "git config --unset branch.master.mergeoptions"?
--
Jakub Narebski
Poland
ShadeHawk on #git
next prev parent reply other threads:[~2008-04-25 9:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-24 5:43 [PATCH 1/5] New merge tests Sverre Hvammen Johansen
2008-04-25 9:37 ` Jakub Narebski [this message]
2008-05-03 22:00 ` Sverre Hvammen Johansen
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3tzhqp96h.fsf@localhost.localdomain \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=hvammen@gmail.com \
/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.
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 NNTP newsgroup(s).