Daniel Barkalow <barkalow@xxxxxxxxxxxx> wrote: > There's an SVN project I'm trying to track with git-svn. "git svn fetch" > fetches and imports the commits perfectly, but I can't figure out a way to > merge upstream commits into my branch automatically. I don't suggest using merge with git-svn since it can generate non-linear history. Non-linear history does not map well to SVN. "git svn rebase" (in 1.5.1) is handy for getting upstream commits into your branch (it's a wrapper around "git rebase") > It seems like the right solution should be: > > [remote "origin"] > importer = svn > url = svn://ixion.tartarus.org/main > fetch = puzzles:refs/remotes/puzzles > [branch "master"] > remote = origin > merge = puzzles git-svn in 1.5.1 already allows you to define: [svn-remote "svn"] url = svn://ixion.tartarus.org/main fetch = puzzles:refs/remotes/puzzles And then "git svn rebase" should automatically be able to figure out to rebase against refs/remotes/puzzles without needing a [branch "master"] section. I don't think having the "importer = svn" in [remote "..."] is a good idea since it would be incompatible with older versions of git and the documentation would confuse users who don't track the latest version. > Which would mean that it would use "git svn fetch" instead of "git fetch" > for that remote, and "git svn fetch" would use that config section instead > of its current config section. Here's what I'd like git-fetch to do someday[1]: When git-fetch is called without any remote arguments, it would look for [remote "origin"] as it does now. However, if no [remote "..."] sections are found (as is common with importer-created repos), it would try other importers: [svn-remote "svn"], (and hopefully one day [cvs-remote "cvs"], [arch-remote "arch"], ...). Of course, git-fetch would also be able to handle --svn (and later --cvs/--arch/...) flags if the [*remote "..."] section names are ambiguous. I intentionally named the default svn-remote section "svn" instead of "origin" for this reason, too; I didn't want to confuse git-fetch. [1] - patches would be very much welcome (*nudge*nudge*wink*wink), I have a lot on my plate and this isn't a high priority. -- Eric Wong - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html