From: Avery Pennarun <apenwarr@gmail.com>
To: Ron Garret <ron1@flownet.com>
Cc: git@vger.kernel.org
Subject: Re: git-mv redux: there must be something else going on
Date: Wed, 3 Feb 2010 15:40:02 -0500 [thread overview]
Message-ID: <32541b131002031240p6b67536ame6b69c6d662a7968@mail.gmail.com> (raw)
In-Reply-To: <ron1-34F9C6.12273203022010@news.gmane.org>
On Wed, Feb 3, 2010 at 3:27 PM, Ron Garret <ron1@flownet.com> wrote:
> So I think I'm beginning to understand how this works, but that leads me
> to another question: it seems to me that there are potential screw cases
> for this purely content-based system of tracking files. For example,
> suppose I have a directory full of sample config files, all of which are
> similar to each other. Will that cause diffcore to get confused?
Cases like that are always confusing, even to humans. Person A
renames X to Y, but at the same time creates Z which is almost
identical. Person B patches X, then merges in person A's changes.
What do you expect to happen? Should Y be changed, because that's the
file X was moved from? Or should we change Z, because it's almost the
same content anyway? Or maybe we should change both, since a change
to the old X is probably intended to affect the copied *content* that
ended up in both Y and Z?
Simply storing whether person A has renamed vs. copied vs. added a
file makes the answer to the "what do you expect to happen" question
more obvious, but fails to answer the "what *should* happen" question.
Thus it's more of a distraction than a feature. It took a while for
me to accept this, but once I did, I realized that git's behaviour has
still never caused me a problem in real life, despite repeated file
renames and complicated merges.
In contrast, svn's explicit rename tracking has shot me in the foot
numerous times. (svn remembers when I delete file X and then
subsequently re-add it with the same content. So if I merge in
someone's change to the *old* file X, it barfs because omg omg that's
a totally different file X and it can't possibly figure out what to
do. Gee, thanks. It's also hopelessly incompetent at handling
"renames" in which a newbie developer didn't know to use svn mv, but
instead used svn rm, mv, and svn add.)
Have fun,
Avery
next prev parent reply other threads:[~2010-02-03 20:40 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-03 18:25 git-mv redux: there must be something else going on Ron Garret
2010-02-03 18:48 ` Avery Pennarun
2010-02-03 19:23 ` Ron Garret
2010-02-03 19:47 ` Avery Pennarun
2010-02-03 20:30 ` Ron Garret
2010-02-03 19:53 ` Nicolas Pitre
2010-02-03 20:27 ` Ron Garret
2010-02-03 20:31 ` Ron Garret
2010-02-03 20:40 ` Avery Pennarun [this message]
2010-02-03 22:33 ` Ron Garret
2010-02-03 23:18 ` Avery Pennarun
2010-02-03 23:55 ` Jay Soffian
2010-02-04 0:10 ` Ron Garret
2010-02-04 0:10 ` Ron Garret
2010-02-04 0:48 ` Junio C Hamano
2010-02-03 20:44 ` Nicolas Pitre
2010-02-03 20:12 ` Pete Harlan
2010-02-03 20:34 ` Ron Garret
2010-02-03 21:12 ` [PATCH] Documentation: clarify git-mv behaviour wrt dirty files Thomas Rast
2010-02-03 21:56 ` 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=32541b131002031240p6b67536ame6b69c6d662a7968@mail.gmail.com \
--to=apenwarr@gmail.com \
--cc=git@vger.kernel.org \
--cc=ron1@flownet.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).