From: Steven Grimm <koreth@midwinter.com>
To: Theodore Tso <tytso@mit.edu>
Cc: Martin Langhoff <martin.langhoff@gmail.com>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: blame follows renames, but log doesn't
Date: Tue, 19 Jun 2007 02:54:55 -0700 [thread overview]
Message-ID: <4677A7EF.500@midwinter.com> (raw)
In-Reply-To: <20070619071916.GC9177@thunk.org>
Theodore Tso wrote:
> Actually, the bigger missing gap is merges. Suppose in the
> development branch, you rename a whole bunch of files. (For example,
> foo_super.c got moved to foo/super.c, foo_inode.c got moved to
> foo/inode.c, etc.)
>
> Now suppose there are fixes made in the stable branch, in the original
> foo_super.c and foo_inode.c files. Ideally you would want to be able
> to pull those changes into the development branch, where the files
> have new names, and have the changes be applied to foo/super.c and
> foo/inode.c in the development branch.
>
I believe git handles this case already, actually. I've seen this work
just fine many times.
What git doesn't handle, but BitKeeper does, is applying directory
renames to newly created files. I rename the "lib" directory to "util",
you create a new file lib/strings.c and update lib/Makefile to compile
it. I pull from you. Under BitKeeper, I will get util/strings.c and the
change will be applied to my util/Makefile. git will create a brand-new
"lib" directory containing nothing but the new file, but since the
Makefile existed before, it will (correctly) apply your change to my
util/Makefile, which will then break my build because it will refer to a
file that doesn't exist in the Makefile's directory.
This has bitten me a few times in real life, e.g. in cases where I'm
importing a third-party source tarfile and reorganizing it a little to
fit it into my local build system. Every time they add a new source
file, I have to go manually clean up after it rather than just merging
the vendor branch into mine like I can do when they don't add anything.
It is not frequent enough to be a major hassle for me but it sure is
annoying when it happens (especially since sometimes the build *doesn't*
break and it takes a while to notice a newly created file isn't where it
should be.)
-Steve
next prev parent reply other threads:[~2007-06-19 9:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-19 1:10 blame follows renames, but log doesn't Martin Langhoff
2007-06-19 1:34 ` Sam Vilain
2007-06-19 7:19 ` Theodore Tso
2007-06-19 8:31 ` Martin Langhoff
2007-06-19 8:39 ` Junio C Hamano
2007-06-19 9:54 ` Steven Grimm [this message]
2007-06-19 18:28 ` Directory renames (was Re: blame follows renames, but log doesn't) Steven Grimm
2007-06-20 20:18 ` Sam Vilain
2007-06-20 20:59 ` Steven Grimm
2007-06-20 22:11 ` blame follows renames, but log doesn't 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=4677A7EF.500@midwinter.com \
--to=koreth@midwinter.com \
--cc=git@vger.kernel.org \
--cc=martin.langhoff@gmail.com \
--cc=tytso@mit.edu \
/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).