Skip to content

Commit ce45a45

Browse files
trastEric Wong
authored andcommitted
Document git-svn's first-parent rule
git-svn has the following rule to detect the SVN base for its operations: find the first git-svn-id line reachable through first-parent ancestry. IOW, git log --grep=^git-svn-id: --first-parent -1 Document this, as it is very important when using merges with git-svn. Signed-off-by: Thomas Rast <trast@student.ethz.ch>
1 parent 6111b93 commit ce45a45

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Documentation/git-svn.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,16 @@ merges you've made. Furthermore, if you merge or pull from a git branch
742742
that is a mirror of an SVN branch, 'dcommit' may commit to the wrong
743743
branch.
744744

745+
If you do merge, note the following rule: 'git svn dcommit' will
746+
attempt to commit on top of the SVN commit named in
747+
------------------------------------------------------------------------
748+
git log --grep=^git-svn-id: --first-parent -1
749+
------------------------------------------------------------------------
750+
You 'must' therefore ensure that the most recent commit of the branch
751+
you want to dcommit to is the 'first' parent of the merge. Chaos will
752+
ensue otherwise, especially if the first parent is an older commit on
753+
the same SVN branch.
754+
745755
'git clone' does not clone branches under the refs/remotes/ hierarchy or
746756
any 'git svn' metadata, or config. So repositories created and managed with
747757
using 'git svn' should use 'rsync' for cloning, if cloning is to be done

0 commit comments

Comments
 (0)