From: "Shawn O. Pearce" <spearce@spearce•org>
To: Michael Witten <mfwitten@MIT•EDU>
Cc: git@vger•kernel.org
Subject: Re: Proposed git mv behavioral change
Date: Thu, 18 Oct 2007 22:15:29 -0400 [thread overview]
Message-ID: <20071019021529.GX14735@spearce.org> (raw)
In-Reply-To: <7F18F52A-3D57-4510-B71B-69D43480126E@MIT.EDU>
Michael Witten <mfwitten@MIT•EDU> wrote:
> On 18 Oct 2007, at 9:57:15 PM, Shawn O. Pearce wrote:
> >Michael Witten <mfwitten@MIT•EDU> wrote:
> >>
> >>Seems like the shortcut would lose the history and confuse git.
> >
> >No. It wouldn't. The index has no knowledge of history of anything.
>
> I mean to say, if only the index is changed,
> then git won't be informed about the necessary
> git-{add/rm}'s, as in the following (is this
> not so?):
git-add amounts to either inserting a new path->stat/sha1 entry
in the index, or updating an existing entry with new stat/sha1
information.
git-rm amounts to removing a path->stat/sha1 entry from the index.
It's just gone once the git-rm is completed. As if it was never
there to begin with.
A git-commit (really git-write-tree but same difference to the
end-user) stores whatever is in the index as the gospel truth for
how that commit's files should appear. No knowledge about add
or rm is necessary at this stage, we're just taking a copy of the
index and recording that for posterity.
So updating the index is all that is necessary to "remember" these
add and rm operations. OK, well, you also need to actually make
a commit (and not orphan that commit) to have it really stay in
your project. But its all really as simple as it seems.
--
Shawn.
next prev parent reply other threads:[~2007-10-19 2:15 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-18 15:47 Proposed git mv behavioral change lmage11
2007-10-19 1:47 ` Michael Witten
2007-10-19 1:57 ` Shawn O. Pearce
2007-10-19 2:07 ` Michael Witten
2007-10-19 2:15 ` Shawn O. Pearce [this message]
2007-10-19 2:16 ` Jeff King
2007-10-19 2:29 ` Michael Witten
2007-10-19 11:33 ` Wincent Colaiuta
2007-10-19 15:57 ` Michael Witten
2007-10-19 1:54 ` Shawn O. Pearce
2007-10-19 2:54 ` Michael Witten
2007-10-19 3:19 ` Shawn O. Pearce
2007-10-19 3:24 ` Jeff King
2007-10-19 3:26 ` Michael Witten
2007-10-19 3:35 ` Jeff King
2007-10-19 3:40 ` Michael Witten
2007-10-19 3:47 ` Jeff King
2007-10-19 3:53 ` Michael Witten
2007-10-19 3:58 ` Jeff King
2007-10-20 5:55 ` Ari Entlich
2007-10-20 6:24 ` Jeff King
2007-10-20 6:34 ` Michael Witten
2007-10-20 6:36 ` Jeff King
2007-10-20 6:36 ` Shawn O. Pearce
2007-10-20 6:40 ` Jeff King
2007-10-22 14:00 ` Karl Hasselström
2007-10-20 6:45 ` Michael Witten
2007-10-20 7:02 ` Shawn O. Pearce
2007-10-20 11:15 ` Wincent Colaiuta
2007-10-22 14:08 ` Karl Hasselström
2007-10-20 5:55 ` Ari Entlich
2007-10-20 6:30 ` Shawn O. Pearce
2007-10-20 7:46 ` Mike Hommey
2007-10-20 6:34 ` Jeff King
-- strict thread matches above, loose matches on Subject: below --
2007-10-19 4:41 lmage11
2007-10-20 5:55 Ari Entlich
2007-10-20 6:31 ` Jeff King
2007-10-20 11:02 ` Wincent Colaiuta
2007-10-20 11:06 ` Jeff King
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=20071019021529.GX14735@spearce.org \
--to=spearce@spearce$(echo .)org \
--cc=git@vger$(echo .)kernel.org \
--cc=mfwitten@MIT$(echo .)EDU \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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