git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Steven Grimm <koreth@midwinter.com>
Cc: git@vger.kernel.org
Subject: Re: Using git to bridge two svn repositories: a success story
Date: Fri, 20 Apr 2007 00:18:37 -0700	[thread overview]
Message-ID: <7vk5w7344y.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <46283DC4.7070604@midwinter.com> (Steven Grimm's message of "Thu, 19 Apr 2007 21:12:52 -0700")

Steven Grimm <koreth@midwinter.com> writes:

> ..., so here's a success
> story I can share for a change. I just used git to merge two separate
> svn repositories: the official repo for an open-source program and an
> internal repo with our locally-modified version of the same
> program.

Nice story.  Thanks for sharing.

> Now, about those renames. The major change in structure was to rename
> the source directory from "server" in the official repository to "src"
> which our build system expects. So before I did any merges, I
> committed a revision where I did "git mv src server" (along with a
> couple other similar renames) so there'd be an explicit rename-only
> revision for git's rename detection to use to apply changes to the
> right files.

In the work you did in the story, your rename from server to src
was indeed an atomic action YOU wanted to have, which was done
to match the two tree structure.  It was your project, not git,
that did not want the name upstream uses.  So it makes perfect
sense to have that rename-only commit.  But if you do it only
because you think it would help later merges, don't.

I do not know who started this myth, but "rename only commit"
does not help rename detection in merges AT ALL, as rename
deteciton is not done step-by-step, but between ancestor and the
tip of each branch.

A "rename-only commit" does help if you are following history
with "git log -p -M", where rename detection logic compares
trees stepwise.  I think somebody confused this with the rename
detection done by the merge machinery to start the myth.  Please
do not spread it any further.

      reply	other threads:[~2007-04-20  7:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-20  4:12 Using git to bridge two svn repositories: a success story Steven Grimm
2007-04-20  7:18 ` Junio C Hamano [this message]

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vk5w7344y.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).