Skip to content

git svn: use rebase --rebase-merges instead of preserve-merges #295

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Documentation/git-svn.txt
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,8 @@ config key: svn.authorsProg
-s<strategy>::
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the Git mailing list, Eric Wong wrote (reply to this):

Johannes Schindelin via GitGitGadget <[email protected]> wrote:
> From: Johannes Schindelin <[email protected]>
> 
> We deprecated `--preserve-merges` in favor of `--rebase-merges`; Let's
> reflect that in `git svn`.
> 
> Note: Even when the user asks for `--preserve-merges`, we now silently
> pass `--rebase-merges` to `git rebase` instead. Technically, this is a
> change of behavior. But practically, `git svn` only ever asks for a
> non-interactive rebase, and `--preserve-merges` and `--rebase-merges`
> are on par with regard to that.

I've never used --preserve-merges or --rebase-merges even with
standalone git; but this seems fine as there's no actual
behavior change...

> Signed-off-by: Johannes Schindelin <[email protected]>

Acked-by: Eric Wong <[email protected]>

Thanks.

--strategy=<strategy>::
-p::
--preserve-merges::
--rebase-merges::
--preserve-merges (DEPRECATED)::
These are only used with the 'dcommit' and 'rebase' commands.
+
Passed directly to 'git rebase' when using 'dcommit' if a
Expand Down
9 changes: 5 additions & 4 deletions git-svn.perl
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ sub _req_svn {
$_template, $_shared,
$_version, $_fetch_all, $_no_rebase, $_fetch_parent,
$_before, $_after,
$_merge, $_strategy, $_preserve_merges, $_dry_run, $_parents, $_local,
$_merge, $_strategy, $_rebase_merges, $_dry_run, $_parents, $_local,
$_prefix, $_no_checkout, $_url, $_verbose,
$_commit_url, $_tag, $_merge_info, $_interactive, $_set_svn_props);

Expand Down Expand Up @@ -270,7 +270,8 @@ sub _req_svn {
'local|l' => \$_local,
'fetch-all|all' => \$_fetch_all,
'dry-run|n' => \$_dry_run,
'preserve-merges|p' => \$_preserve_merges,
'rebase-merges|p' => \$_rebase_merges,
'preserve-merges|p' => \$_rebase_merges,
%fc_opts } ],
'commit-diff' => [ \&cmd_commit_diff,
'Commit a diff between two trees',
Expand Down Expand Up @@ -1054,7 +1055,7 @@ sub cmd_dcommit {
'If you are attempting to commit ',
"merges, try running:\n\t",
'git rebase --interactive',
'--preserve-merges ',
'--rebase-merges ',
$gs->refname,
"\nBefore dcommitting";
}
Expand Down Expand Up @@ -1717,7 +1718,7 @@ sub rebase_cmd {
push @cmd, '-v' if $_verbose;
push @cmd, qw/--merge/ if $_merge;
push @cmd, "--strategy=$_strategy" if $_strategy;
push @cmd, "--preserve-merges" if $_preserve_merges;
push @cmd, "--rebase-merges" if $_rebase_merges;
@cmd;
}

Expand Down