From 5eec27e35f0a6231d2b0c50d94c726a67f14b23e Mon Sep 17 00:00:00 2001 From: Thomas Rast Date: Fri, 29 May 2009 17:09:42 +0200 Subject: git-svn: let 'dcommit $rev' work on $rev instead of HEAD 'git svn dcommit' takes an optional revision argument, but the meaning of it was rather scary. It completely ignored the current state of the HEAD, only looking at the revisions between SVN and $rev. If HEAD was attached to $branch, the branch lost all commits $rev..$branch in the process. Considering that 'git svn dcommit HEAD^' has the intuitive meaning "dcommit all changes on my branch except the last one", we change the meaning of the revision argument. git-svn temporarily checks out $rev for its work, meaning that * if a branch is specified, that branch (_not_ the HEAD) is rebased as part of the dcommit, * if some other revision is specified, as in the example, all work happens on a detached HEAD and no branch is affected. Signed-off-by: Thomas Rast Acked-by: Eric Wong --- Documentation/git-svn.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Documentation/git-svn.txt') diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index bb22d8e712..5027f9fbd7 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -170,8 +170,9 @@ and have no uncommitted changes. It is recommended that you run 'git-svn' fetch and rebase (not pull or merge) your commits against the latest changes in the SVN repository. - An optional command-line argument may be specified as an - alternative to HEAD. + An optional revision or branch argument may be specified, and + causes 'git-svn' to do all work on that revision/branch + instead of HEAD. This is advantageous over 'set-tree' (below) because it produces cleaner, more linear history. + -- cgit v1.2.1