Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8818219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:03:34+00:00 2026-06-14T05:03:34+00:00

I wrote, and maintain, an open-source tool called reposurgeon that edits version-control repository histories

  • 0

I wrote, and maintain, an open-source tool called reposurgeon that edits version-control repository histories and can be used to move project histories between VCSes. Recently I shipped full support for reading Subversion dump files and repos. But there is one thing reposurgeon doesn’t do very well yet, and that is translate Subversion branch merges done by copying to git-style DAG merges.

In order to get this part right, I need to understand the semantics of merge commits in a git fast-import stream much better than I do. My questions are about which version of content is supposed to be visible after a merge commit.

Of course, file modifications attached the merge commit make their content visible there. My questions are about paths not touched by the commit.

  1. If a path only has content on only one commit chain ancestral to the merge, I assume that content is supposed to be visible. Is that correct?

  2. If a path has content in more than one commit chain ancestral to the merge, which version will be visible?

  3. If a file is deleted along some paths to the merge, what rule predicts when it will be deleted in the merge revision?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T05:03:36+00:00Added an answer on June 14, 2026 at 5:03 am

    if I understand your question, you’re wondering exactly what shortcuts fast-import lets you take when streaming the contents of a commit into it.

    As far as I can tell from reading git/fast-import.c and the manual page, fast-import initializes the tree for a new commit from the tree that was provided in the “from” command. “filemodify” and friends begin from that state to construct the new tree that will be committed at the end.

    The fast-import command does not appear to change the tree at all when encountering “merge” commands; if you want to include changes from parents other than the first, you need to specify exactly which files you want to bring in. You can use marks or object hashes to name the other-branch files for “filemodify” though.


    edit: Ah, let’s go deeper into the git model.

    In git, a commit points to a tree that represents the entire contents of the directory hierarchy being tracked, as it stood at the time of that commit. Commits do not carry any information about how they’re different from their parents; the theory is that you can reconstruct the diff if you need it by comparing these trees.

    A merge commit is distinguished from non-merges only by the fact that it has two or more parents. It still has a single tree, recording exactly what’s in the version that resulted from performing the merge. It still does not record anything about how its author combined the parents into a merged version. The git “porcelain” commands like git log and git diff do magic to reconstruct a useful description of what happened.

    Conceptually, to create a new commit object, you need to describe the complete mapping of paths to file contents that goes in that commit. (Much cleverness goes into making that efficient and simple instead of awful.)

    The git fast-import command provides a shortcut for the common case: Usually the VCS you’re exporting from can tell you how this commit was formed as some kind of diff from the most recent commit on the same branch. In that case, you can effectively encode the diff into fast-import’s stream format for a simpler and faster import.

    But you have to remember it’s only a shortcut for re-constructing the entire tree from scratch.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been looking round for an open-source CMS framework that I can use
I wrote a PHP script that retrieves values from a MySQL Query. I used
In an open source project I maintain, we have at least three different ways
I wrote a Flickr search engine that makes a call to either a public
I have an application that we wrote here at work that uses the SharpSVN
I have a WPF project where I maintain video ratio, by placing video control
We have an XML document that has a tag we wish to alter: ...<version>1.0</version>...
We're considering using SSIS to maintain a PostgreSql data warehouse. I've used it before
I wrote and maintain a medium sized website with about 1K active users. I
I wrote an if statement that should write different output depending on the data.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.