From: "Martin Langhoff" <martin.langhoff@gmail.com>
To: "Steven Grimm" <koreth@midwinter.com>
Cc: "Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
"Jakub Narebski" <jnareb@gmail.com>,
git@vger.kernel.org
Subject: Re: Rename handling
Date: Thu, 22 Mar 2007 12:10:06 +1200 [thread overview]
Message-ID: <46a038f90703211710q168a691cpa282f8e2afc5c8a6@mail.gmail.com> (raw)
In-Reply-To: <4601B199.9060300@midwinter.com>
On 3/22/07, Steven Grimm <koreth@midwinter.com> wrote:
> Say you're tracking a directory full of video files. Even a slight tweak
> to one of them (to put a logo in the corner, say, while moving it into
> an "accessible by the public" directory) will result in a file that has
> no content in common at all if you look at it as purely a stream of
In that case, tracking the rename is not useful at all from the POV of
your SCM. The reason the SCM needs to understand content-movement (of
which renames are a special type), it to help you as much as possible
at merge time.
So - git as an SCM focusses on tracking your content, and helping you
merge. It does _that_ probably better than any other SCM. So git
internat data structures care strictly about the stuff that is needed
for git's operation as an SCM.
And in the context of helping you merge, explicit rename tracking is a
red-herring. This point is arguable - Linus said earlier "you can do
better by tracking content and ignoring explicit renames" and we are
now getting there in terms of having code that does better.
Of course in your case the fact that there was a rename is important
-- for users. This kind of information is not metadata for the SCM but
for users. So that goes into the commit message, which is freeform. So
- working with your scenario, if this happens often, I would suggest
having a pre-commit hook that prepares a nice commit text message
listing likely renames if they can be sussed out automatically.
Or having a custom git-mv that collects mv operations and then your
pre-commit-hook preps your commit message with that manifest of moved
files.
Does it make sense? It is data-for-the-user, so it goes in the commit
msg. If it's data-for-the-SCM machinery, then it goes into the
tracking data git handles internally.
cheers,
martin
next prev parent reply other threads:[~2007-03-22 0:10 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-19 16:10 Rename handling John Goerzen
2007-03-19 18:14 ` Steven Grimm
2007-03-19 18:35 ` Nicolas Pitre
2007-03-19 18:48 ` Linus Torvalds
2007-03-19 19:57 ` Steven Grimm
2007-03-19 20:19 ` Martin Langhoff
2007-03-20 8:33 ` Junio C Hamano
2007-03-19 20:22 ` Linus Torvalds
2007-03-19 20:02 ` Robin Rosenberg
2007-03-19 20:34 ` Linus Torvalds
2007-03-19 19:36 ` Steven Grimm
2007-03-19 19:45 ` Steven Grimm
2007-03-19 20:07 ` Linus Torvalds
2007-03-19 20:17 ` Nicolas Pitre
2007-03-19 20:44 ` Daniel Barkalow
2007-03-19 19:03 ` Andy Parkins
2007-03-19 19:21 ` Steven Grimm
2007-03-21 0:06 ` Jakub Narebski
2007-03-21 0:25 ` Johannes Schindelin
2007-03-21 22:28 ` Steven Grimm
2007-03-21 23:01 ` Johannes Schindelin
2007-03-21 23:10 ` Linus Torvalds
2007-03-22 0:10 ` Martin Langhoff [this message]
2007-03-22 2:01 ` Jakub Narebski
2007-03-22 2:39 ` Martin Langhoff
2007-03-22 3:32 ` Jakub Narebski
2007-03-22 3:53 ` Linus Torvalds
2007-03-19 19:15 ` Daniel Barkalow
2007-03-19 19:49 ` John Goerzen
2007-03-19 22:27 ` Junio C Hamano
2007-03-21 0:21 ` Jakub Narebski
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=46a038f90703211710q168a691cpa282f8e2afc5c8a6@mail.gmail.com \
--to=martin.langhoff@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=jnareb@gmail.com \
--cc=koreth@midwinter.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).