git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git-svn: What is --follow-parent / --no-follow-parent for?

From
Sebastian Leske <sebastian.leske@sleske.name>
Date
Nov 20, 2012, 07:31 UTC
Message-ID
<20121120073153.GA340@localhost>
Hi,
on reading the docs of "git-svn", I stumbled across this paragraph:
Show 5 quoted lines
> --follow-parent
> This is especially helpful when we’re tracking a directory that has been
> moved around within the repository, or if we started tracking a branch
> and never tracked the trunk it was descended from.  This feature is
> enabled by default, use --no-follow-parent to disable it.

However, this does not make sense to me: This sounds like there is no good reason *not* to enable this option. So why is it there? And in what situation might I want to use "--no-follow-parent"?

As a matter of fact, I'm not even sure what "--no-follow-parent" does (and the docs don't really say).

I tried it out with a small test repo with a single branch (produced by copying the trunk, then later deleted). With --follow-parent git-svn correctly detected the branch point, and modeled the branch deletion as a merge. With --no-follow-parent it just acted as if branch and trunk were completely unrelated.

Commit graph of git-svn result:
--follow-parent:               --no-follow-parent:
       |                               |
      /|                             | |
     / |                             | |
     | |                             | |
     | |                             | |
     | |                             | |
     \ |                             | |
      \|                             | |
       |                               | 
(please excuse cheap ASCII art)

Is that the only effect of --no-follow-parent? And again, why would I want that?

I'd be grateful for any clarifications. If I manage to understand the explanation, I'll volunteer to summarize it into doc patch (if there are no objections).

Next: Steven Michalske
Message 1 of 4 in “git-svn: What is --follow-parent / --no-follow-parent for?”
  1. Sebastian LeskeNov 20, 2012
  2. Steven MichalskeNov 28, 2012
  3. Eric WongNov 28, 2012
  4. Sebastian LeskeNov 28, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.