From 6111b934991f3ea670ac2442806c976defc7b61c Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 15 Nov 2009 18:57:16 -0800 Subject: git svn: attempt to create empty dirs on clone+rebase We parse unhandled.log files for empty_dir statements and make a best effort attempt to recreate empty directories on fresh clones and rebase. This should cover the majority of cases where users work off a single branch or for projects where branches do not differ in empty directories. Since this cannot affect "normal" git commands like "checkout" or "reset", so users switching between branches in a single working directory should use the new "git svn mkdirs" command after switching branches. Signed-off-by: Eric Wong --- Documentation/git-svn.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Documentation') diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index 1812890a7e..db00ed43b7 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -320,6 +320,13 @@ Any other arguments are passed directly to 'git log' directories. The output is suitable for appending to the $GIT_DIR/info/exclude file. +'mkdirs':: + Attempts to recreate empty directories that core git cannot track + based on information in $GIT_DIR/svn//unhandled.log files. + Empty directories are automatically recreated when using + "git svn clone" and "git svn rebase", so "mkdirs" is intended + for use after commands like "git checkout" or "git reset". + 'commit-diff':: Commits the diff of two tree-ish arguments from the command-line. This command does not rely on being inside an `git svn -- cgit v1.2.3 From ce45a45f24cc7b3ccc7f6ebcd0025559b4421bda Mon Sep 17 00:00:00 2001 From: Thomas Rast Date: Mon, 16 Nov 2009 11:15:17 +0100 Subject: 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 --- Documentation/git-svn.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Documentation') diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index db00ed43b7..4cdca0d874 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -742,6 +742,16 @@ merges you've made. Furthermore, if you merge or pull from a git branch that is a mirror of an SVN branch, 'dcommit' may commit to the wrong branch. +If you do merge, note the following rule: 'git svn dcommit' will +attempt to commit on top of the SVN commit named in +------------------------------------------------------------------------ +git log --grep=^git-svn-id: --first-parent -1 +------------------------------------------------------------------------ +You 'must' therefore ensure that the most recent commit of the branch +you want to dcommit to is the 'first' parent of the merge. Chaos will +ensue otherwise, especially if the first parent is an older commit on +the same SVN branch. + 'git clone' does not clone branches under the refs/remotes/ hierarchy or any 'git svn' metadata, or config. So repositories created and managed with using 'git svn' should use 'rsync' for cloning, if cloning is to be done -- cgit v1.2.3