From: Johannes Sixt <j.sixt@viscovery.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Nanako Shiraishi <nanako3@lavabit.com>,
Nathan Yergler <nathan@creativecommons.org>,
Michael J Gruber <git@drmicha.warpmail.net>,
Asheesh Laroia <asheesh@asheesh.org>,
git@vger.kernel.org
Subject: Re: [PATCH 1/3] Add "partial commit" tests during a conflicted merge
Date: Fri, 23 Jan 2009 08:09:00 +0100 [thread overview]
Message-ID: <49796D0C.5070408@viscovery.net> (raw)
In-Reply-To: <7vbpty4kby.fsf_-_@gitster.siamese.dyndns.org>
Junio C Hamano schrieb:
> +test_expect_success 'setup merge commit with paths test' '
> + git reset --hard &&
> + git checkout HEAD^0 &&
> + echo frotz >file &&
> + test_tick &&
> + git add file &&
> + git commit -a -m "one side says frotz" &&
> + git tag one-side-says-frotz &&
> + git reset --hard HEAD^ &&
> + echo nitfol >file &&
> + test_tick &&
> + git add file &&
> + git commit -a -m "the other side says nitfol" &&
> + git tag the-other-side-says-nitfol
> +'
> +
> +test_expect_success 'reject --only during a merge' '
> + git checkout HEAD^0 &&
> + git reset --hard the-other-side-says-nitfol &&
> + test_must_fail git merge one-side-says-frotz &&
> + echo yomin-only >file &&
> + test_must_fail git commit -m merge --only file &&
I don't see why this must fail: 'file' is the only file that is different
from HEAD. Yes, currently we fail; but if something is about to be
changed, then this can change as well.
> + git reset --hard
> +'
> +
> +test_expect_success 'allow --include during a merge' '
> + git checkout HEAD^0 &&
> + git reset --hard the-other-side-says-nitfol &&
> + test_must_fail git merge one-side-says-frotz &&
> + echo yomin-include >file &&
> + git commit -m merge --include file &&
> + git reset --hard
> +'
> +
> +test_expect_failure 'assume --include during a merge' '
> + git checkout HEAD^0 &&
> + git reset --hard the-other-side-says-nitfol &&
> + test_must_fail git merge one-side-says-frotz &&
> + echo yomin-assumed >file &&
> + git add file &&
> + git commit -m merge file &&
> + git reset --hard
> +'
If I read the test case correctly, there is only 'file' that is different
from HEAD, and it had a conflict. But IMO, the test should stress the
point that after the conflicted merge there are at least two files that
are different from HEAD, one was trivially merged, and the other had a
conflict.
-- Hannes
next prev parent reply other threads:[~2009-01-23 7:11 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-21 21:00 Short "git commit $file" syntax fails in the face of a resolved conflict Asheesh Laroia
2009-01-21 21:35 ` Michael J Gruber
2009-01-21 21:46 ` Nathan Yergler
2009-01-22 7:28 ` Johannes Sixt
2009-01-22 9:17 ` Michael J Gruber
2009-01-23 0:45 ` Nanako Shiraishi
2009-01-23 2:55 ` Asheesh Laroia
2009-01-23 6:15 ` Junio C Hamano
2009-01-23 6:17 ` [PATCH 1/3] Add "partial commit" tests during a conflicted merge Junio C Hamano
2009-01-23 7:09 ` Johannes Sixt [this message]
2009-01-23 7:16 ` Junio C Hamano
2009-01-23 7:32 ` Johannes Sixt
2009-01-23 7:39 ` Junio C Hamano
2009-01-23 6:19 ` [PATCH 2/3] builtin-commit: shorten eye-sore overlong lines Junio C Hamano
2009-01-23 6:21 ` [PATCH 3/3] git commit: pathspec without -i/-o implies -i semantics during a merge Junio C Hamano
2009-01-23 9:51 ` Pieter de Bie
2009-01-23 17:01 ` Junio C Hamano
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=49796D0C.5070408@viscovery.net \
--to=j.sixt@viscovery.net \
--cc=asheesh@asheesh.org \
--cc=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=nanako3@lavabit.com \
--cc=nathan@creativecommons.org \
/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).