git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Lars Hjemli" <hjemli@gmail.com>
To: "Junio C Hamano" <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/5] Add test-script for git-merge porcelain
Date: Sun, 23 Sep 2007 12:24:03 +0200	[thread overview]
Message-ID: <8c5c35580709230324m65c5399ds8c7ce21df4461e66@mail.gmail.com> (raw)
In-Reply-To: <7vwsuidx1a.fsf@gitster.siamese.dyndns.org>

On 9/23/07, Junio C Hamano <gitster@pobox.com> wrote:
> Lars Hjemli <hjemli@gmail.com> writes:
>
> > This test-script tries to excercise the porcelainish aspects of git-merge.
>
> It does exercise; no need for "tries to" ;-).

Heh, ok

> > +     cmp -s file result.1
> > +'
>
> Unless there is a compelling reason otherwise, I'd prefer tests
> with a test vector like this to be spelled like this:
>
>         diff -u result.1 file
>
> That is, compare to show the difference actual output might have
> from the expected result.  It's easier to spot the difference
> when you later break things this way.

Good point, I'll change it.

>
> > +test_expect_success 'merge c1 with c2' '
> > +     git reset --hard c1 &&
> > +     git merge c2 &&
> > +     test "$c1" = "$(git rev-parse HEAD^1)" &&
> > +     test "$c2" = "$(git rev-parse HEAD^2)"
> > +'
>
> We might also want to test:
>
>  - the index is merged;
>
>  - the working tree matches the index;
>
>  - the merge message (e.g. "git show -s --pretty=format:%s
>    HEAD") is as expected;

Yes, sorry for being lazy ;-)  I'll add more thorough verification

>
> Otherwise I think it is a good idea to add these tests.
>
> By the way, I think squash_message() leaves a wrong message
> template for an Octopus, which might be worth fixing.

Ok, I'll try to detect it in the test-script and send a proper fix.

Thanks for the review.

-- 
larsh

      reply	other threads:[~2007-09-23 10:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-22  0:33 [PATCH 0/5] per branch options for git-merge incl. --no-ff Lars Hjemli
2007-09-22  0:33 ` [PATCH 1/5] Add test-script for git-merge porcelain Lars Hjemli
2007-09-22  0:33   ` [PATCH 2/5] git-merge: refactor option parsing Lars Hjemli
2007-09-22  0:33     ` [PATCH 3/5] git-merge: add support for branch.<name>.mergeoptions Lars Hjemli
2007-09-22  0:33       ` [PATCH 4/5] git-merge: add support for --commit Lars Hjemli
2007-09-22  0:33         ` [PATCH 5/5] git-merge: add --ff and --no-ff options Lars Hjemli
2007-09-23  0:51         ` [PATCH 4/5] git-merge: add support for --commit Junio C Hamano
2007-09-23 10:35           ` Lars Hjemli
2007-09-23  0:51       ` [PATCH 3/5] git-merge: add support for branch.<name>.mergeoptions Junio C Hamano
2007-09-23 10:31         ` Lars Hjemli
2007-09-23 19:20           ` Junio C Hamano
2007-09-23 19:33             ` Lars Hjemli
2007-09-23  0:51   ` [PATCH 1/5] Add test-script for git-merge porcelain Junio C Hamano
2007-09-23 10:24     ` Lars Hjemli [this message]

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=8c5c35580709230324m65c5399ds8c7ce21df4461e66@mail.gmail.com \
    --to=hjemli@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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.
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).