<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/">
  <channel>
    <title>Tag: subversion :: phly, boy, phly</title>
    <description>Tag: subversion :: phly, boy, phly</description>
    <pubDate>Tue, 15 Mar 2011 19:34:34 +0000</pubDate>
    <generator>Zend_Feed_Writer 2.1.4dev (http://framework.zend.com)</generator>
    <link>http://mwop.net/blog/tag/subversion.html</link>
    <atom:link rel="self" type="application/rss+xml" href="http://mwop.net/blog/tag/subversion-rss.xml"/>
    <item>
      <title>Git Subtree Merging Guide</title>
      <pubDate>Tue, 15 Mar 2011 19:34:34 +0000</pubDate>
      <link>http://mwop.net/blog/258-Git-Subtree-Merging-Guide.html</link>
      <guid>http://mwop.net/blog/258-Git-Subtree-Merging-Guide.html</guid>
      <author>me@mwop.net (Matthew Weier O'Phinney)</author>
      <dc:creator>Matthew Weier O'Phinney</dc:creator>
      <content:encoded><![CDATA[<p>
I've been investigating ways to incorporate third-party repositories and
libraries into my <a href="http://git-scm.org/">Git</a> projects. Subversion's
<code>svn:externals</code> capabilities are one compelling feature for that particular VCS,
and few, if any, other VCS systems, particularly the DVCS systems, have a truly
viable equivalent. Git <code>submodules</code> aren't terrible, but they assume you want the
entire repository -- whereas SVN allows you to cherry-pick subdirectories if
desired.
</p>

<p>
Why might I want to link only a subdirectory? Consider a project with this
structure:
</p>

<pre>
docs/
    api/
    manual/
        html/
        module_specs/
library/
    Foo/
        ComponentA/
        ComponentB/
tests/
    Foo/
        ComponentA/
        ComponentB/
</pre>

<p>
On another project, I want to use ComponentB. With <code>svn:externals</code>, this is
easy:
</p>

<pre>
library/Foo/ComponentB http://repohost/svn/trunk/library/Foo/ComponentB
</pre>

<p>
and now the directory is added and tracked.
</p>

<p>
With Git, it's a different story. One solution I've found is using
<a href="https://github.com/apenwarr/git-subtree">git-subtree</a>, an extension to Git. It
takes a bit more effort to setup than <code>svn:externals</code>, but offers the benefits
of easily freezing on a specific commit, and squashing all changes into a single
commit.
</p>

<p>
<a href="http://h2ik.co">Jon Whitcraft</a> recently had some questions about how to use it,
and I answered him via email. Evidently what I gave him worked for him, as he
then requested if he could post my guide -- which
<a href="http://h2ik.co/2011/03/having-fun-with-git-subtree/">you can find here</a>.
</p>]]></content:encoded>
      <slash:comments>0</slash:comments>
    </item>
    <item>
      <title>git-svn Tip: don't use core.autocrlf</title>
      <pubDate>Wed, 24 Sep 2008 16:16:27 +0000</pubDate>
      <link>http://mwop.net/blog/191-git-svn-Tip-dont-use-core.autocrlf.html</link>
      <guid>http://mwop.net/blog/191-git-svn-Tip-dont-use-core.autocrlf.html</guid>
      <author>me@mwop.net (Matthew Weier O'Phinney)</author>
      <dc:creator>Matthew Weier O'Phinney</dc:creator>
      <content:encoded><![CDATA[<p>
    I've been playing around with <a href="http://git.or.cz/">Git</a> in the 
    past couple months, and have been really enjoying it. Paired with
    subversion, I get the best of all worlds -- distributed source control when
    I want it (working on new features or trying out performance tuning), and
    non-distributed source control for my public commits.
</p>

<p>
    <a href="http://github.com/guides/dealing-with-newlines-in-git">Github</a> 
    suggests that when working with remote repositories, you turn on the
    autocrlf option, which ensures that changes in line endings do not get
    accounted for when pushing to and pulling from the remote repo.  However,
    when working with git-svn, this actually causes issues. After turning this
    option on, I started getting the error "Delta source ended unexpectedly"
    from git-svn. After a bunch of aimless tinkering, I finally asked myself the
    questions, "When did this start happening?" and, "Have I changed anything
    with Git lately?" Once I'd backed out the config change, all started working
    again.
</p>

<p>
    In summary: don't use "git config --global core.autocrlf true" when using
    git-svn.
</p>]]></content:encoded>
      <slash:comments>0</slash:comments>
    </item>
  </channel>
</rss>
