From: "Martin Langhoff" <martin.langhoff@gmail.com>
To: "Steven Grimm" <koreth@midwinter.com>
Cc: "Linus Torvalds" <torvalds@linux-foundation.org>,
"Nicolas Pitre" <nico@cam.org>,
"John Goerzen" <jgoerzen@complete.org>,
git@vger.kernel.org
Subject: Re: Rename handling
Date: Tue, 20 Mar 2007 08:19:11 +1200 [thread overview]
Message-ID: <46a038f90703191319y54251f63ldc6060ffbc89deea@mail.gmail.com> (raw)
In-Reply-To: <45FEEB0C.3080602@midwinter.com>
On 3/20/07, Steven Grimm <koreth@midwinter.com> wrote:
> However, "Should we keep the existing rename detection?" is not the same
> question as, "Should the user be able to tell the system he's renaming
> something?"
How is a $SCM-mv that remembers useful in any _interesting_ scenario?
You don't move it just because, you refactor and re-architect
something.
In that area, git's mergers still have a bit to go -- I do hope for a
day when I can say git-merge -s refactor or just git-merge -s
tryharder so that it if hunks don't apply, git will try and trace
where the block of code the hunk applies to has gone.
So recording mv doesn't solve anything other than 1% of the cases --
those full file moves that git will discover anyway even if the file
changed a bit. And recording the mv gives you a false sense of being
useful. It's not.
There's more work in having
go-slow-and-really-try-to-merge-across-a-refactor mergers that could
at least hint at where the hunk is likely to belong now.
> Until someone comes up with a way to make content-based rename detection
> 100% foolproof in the face of things like frequent self-references
Well, if code changes, there are no guarantees. Patching is a
best-effort-but-not-too-smart thing. But in the end, a human needs to
look at it if it's tricky. Wiggle users know ;-)
And, at the end of the day, hitting programmers that move sh*t around
needlessly in the head works too. You wouldn't let them change
projectwide function/method name conventions willy nilly either.
cheers,
martin
next prev parent reply other threads:[~2007-03-19 20:19 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 [this message]
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
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=46a038f90703191319y54251f63ldc6060ffbc89deea@mail.gmail.com \
--to=martin.langhoff@gmail.com \
--cc=git@vger.kernel.org \
--cc=jgoerzen@complete.org \
--cc=koreth@midwinter.com \
--cc=nico@cam.org \
--cc=torvalds@linux-foundation.org \
/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).