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:32:15 +0100 [thread overview]
Message-ID: <4979727F.80007@viscovery.net> (raw)
In-Reply-To: <7vab9i331g.fsf@gitster.siamese.dyndns.org>
Junio C Hamano schrieb:
> Johannes Sixt <j.sixt@viscovery.net> writes:
>
>>> +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.
>
> Not at all.
Read again what I said: 'file' is the *ONLY* file that is different from
HEAD. Why should an explicit --only not work in this case?
> Avoiding --only is to prevent a much more dangerous glitch.
[...]
We are in total agreement about what you said in the rest of the message.
I'm proposing that, during a merge, if --only was given (or remains the
implicit choice), then we compare the index with HEAD, and if nothing
outside the given pathspec differs from HEAD, then allow the commit.
-- Hannes
next prev parent reply other threads:[~2009-01-23 7:33 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
2009-01-23 7:16 ` Junio C Hamano
2009-01-23 7:32 ` Johannes Sixt [this message]
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=4979727F.80007@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).