From: Linus Torvalds <torvalds@linux-foundation.org>
To: Martin Langhoff <martin.langhoff@gmail.com>
Cc: Junio C Hamano <junkio@cox.net>, Git Mailing List <git@vger.kernel.org>
Subject: Re: git-checkout changes the index but not the checked out files?
Date: Mon, 23 Apr 2007 07:53:57 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.0.98.0704230747110.9964@woody.linux-foundation.org> (raw)
In-Reply-To: <46a038f90704221745h1bf2955cyfb40f6e8c08a336d@mail.gmail.com>
On Mon, 23 Apr 2007, Martin Langhoff wrote:
>
> The _really_ strange bit is that it was attempting to merge 2 heads of
> the same name. It'd probably be something to block...
No, "git-read-tree -m A B" is not a "merge" in the sense you're thinking,
it's a "fast-forward merge", ie just a "move from A to B"
So read-tree has three "merges": a one-way merge (which just merges with
the old index _stat_ contents but otherwise just reads in the new tree), a
two-way merge (a "move from A to B") that checks that all paths that are
different in the two trees match the index in the old one, and the "real"
merge, aka the three-way thing (and even that is actially "four-way",
since it also checks the index for matchingness)
So when we move from one head to another, we do that two-way thing. And if
A and B are the same, doesn't really do anything, but there's also no
point to try to avoid doing it.
Linus
next prev parent reply other threads:[~2007-04-23 14:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-22 23:25 git-checkout changes the index but not the checked out files? Martin Langhoff
2007-04-22 23:30 ` Junio C Hamano
2007-04-23 0:17 ` Martin Langhoff
2007-04-23 0:30 ` Junio C Hamano
2007-04-23 0:45 ` Martin Langhoff
2007-04-23 14:53 ` Linus Torvalds [this message]
2007-04-23 20:16 ` Martin Langhoff
2007-04-23 18:35 ` Uwe Kleine-König
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=alpine.LFD.0.98.0704230747110.9964@woody.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=martin.langhoff@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).