From: Cory Sharp <cory.sharp@gmail.com>
To: Michael J Gruber <git@drmicha.warpmail.net>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [Q] merge squash unexpected conflicts
Date: Thu, 14 May 2009 07:47:40 -0700 [thread overview]
Message-ID: <bb9d69200905140747j60b2e09flaabbb4db09b371b4@mail.gmail.com> (raw)
In-Reply-To: <4A0C0BDF.9020803@drmicha.warpmail.net>
On Thu, May 14, 2009 at 5:17 AM, Michael J Gruber
<git@drmicha.warpmail.net> wrote:
> Cory Sharp venit, vidit, dixit 14.05.2009 05:57:
>> On Wed, May 13, 2009 at 8:21 PM, Junio C Hamano <gitster@pobox.com> wrote:
>>> Cory Sharp <cory.sharp@gmail.com> writes:
>>>
>>>> Am I doing something a little wrong or unexpected? Is there a way
>>>> around this squash conflict behavior? This doesn't seem to happen
>>>> with plain merge without squash.
>>>
>>> Of course. That's the whole point of recording a merge as a merge.
>>>
>>
>> $ git help merge
>>
>> --squash
>> Produce the working tree and index state as if a real merge
>> happened. ... This allows you to create a
>> single commit on top of the current branch whose effect is
>> the same as merging another branch.
>
> The problem is simply in the "...". You cut out the vital part:
>
>
> but do not actually make a commit or
> move the `HEAD`, nor record `$GIT_DIR/MERGE_HEAD` to
> cause the next `git commit` command to create a merge
> commit.
>
> See? Tree: yes, index: yes, merge info: no.
>
> Git does perform a (tree) merge with --squash, but records the resulting
> tree as an ordinary non-merge commit (with a single parent).
>
> I'm not sure whether the statement about the index is completely
> correct, though. During a merge the index records info about the merge
> (stages :1: etc.) but that as missing with --squash. Only the resulting
> tree is added to the index. How about the below?
Now I see, thanks for the help. The elided part, at the time I elided
it, did not make me understand that merge info was not written,
particularly when surrounded by its original accompanying text.
Thanks again,
Cory
prev parent reply other threads:[~2009-05-14 14:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bb9d69200905131706m61b0dda1xc347ca2e719ec142@mail.gmail.com>
2009-05-14 2:42 ` [Q] merge squash unexpected conflicts Cory Sharp
2009-05-14 3:21 ` Junio C Hamano
2009-05-14 3:57 ` Cory Sharp
2009-05-14 4:42 ` Junio C Hamano
2009-05-14 6:34 ` Cory Sharp
2009-05-14 6:42 ` Junio C Hamano
2009-05-14 6:54 ` Cory Sharp
2009-05-14 7:01 ` Michael Radziej
2009-05-14 18:25 ` Cory Sharp
2009-05-14 12:17 ` Michael J Gruber
2009-05-14 14:47 ` Cory Sharp [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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bb9d69200905140747j60b2e09flaabbb4db09b371b4@mail.gmail.com \
--to=cory.sharp@gmail.com \
--cc=git@drmicha.warpmail.net \
--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.
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).