From: Daniel Barkalow <barkalow@iabervon.org>
To: Steven Grimm <koreth@midwinter.com>
Cc: John Goerzen <jgoerzen@complete.org>, git@vger.kernel.org
Subject: Re: Rename handling
Date: Mon, 19 Mar 2007 15:15:11 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0703191425560.6485@iabervon.org> (raw)
In-Reply-To: <45FED31B.8070307@midwinter.com>
On Mon, 19 Mar 2007, Steven Grimm wrote:
> John Goerzen wrote:
> > 2) For me, a rename is a logical change to the source tree that I want
> > to be recorded with absolute certainty, not guessed about later.
> > Sometimes I may make API changes and it is useful to see how module
> > names changed, with complete precision, later. I do not want to be
> > victim to an incorrect guess, which could be possible.
> >
>
> If you commit your renames separately from your content changes, it'll be
> unambiguous and you won't have to worry about it. That's what I usually do
> when this is a concern and it has yet to break for me.
>
> On the other hand, I agree with your general point; I really don't like being
> uncertain about whether renames are going to come out correctly or not ("it
> has always worked before" and "it is by design unable to fail" are two very
> different things.) In particular, I strongly disagree with the "names are just
> syntactic sugar, it's the content we're tracking" philosophy.
We are tracking the names as part of the content. They're right there in
the tree objects. It's not like, when you check out an older revision, you
could get the right content under the wrong name. The philosophy is
actually that we're tracking a series of states, and we're somewhat
agnostic on the description of the difference between two states. And it
often makes sense to postpone trying to describe this difference until you
know why you want to know, because it's certainly possible that there are
multiple reasonable interpretations, and some may give better results than
others.
If you're trying to merge a rename-and-refactor change (often something
like splitting a source or header file into two files) with a
modification, and it's arguable what happened in the refactor, the
interpretation which gives the state that's easiest to resolve correctly
may depend on what the modification is. So you really want to leave it up
to the merge code to choose the best guess at the result, without using a
fixed description of what the changes are.
As for whether names or contents "matter more", we have both answers. "git
log <names>" gives you the history of what has happened to change what
appears with those names. "git blame <name>", on the other hand, gives you
the history of the content which now appears at that name. You just need
to ask the question you want the answer to.
-Daniel
*This .sig left intentionally blank*
next prev parent reply other threads:[~2007-03-19 19:15 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
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 [this message]
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=Pine.LNX.4.64.0703191425560.6485@iabervon.org \
--to=barkalow@iabervon.org \
--cc=git@vger.kernel.org \
--cc=jgoerzen@complete.org \
--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).