From: Steven Walter <stevenrwalter@gmail.com>
To: Avishay Lavie <avishay.lavie@gmail.com>
Cc: Eric Wong <normalperson@yhbt.net>, avarab@gmail.com, git@vger.kernel.org
Subject: Re: [PATCH] git-svn: support rebase --preserve-merges
Date: Tue, 22 May 2012 13:32:25 -0400 [thread overview]
Message-ID: <CAK8d-aLFr3Bk6LU-H8FgR8kKQM9sLvectneZ1QnaHDzg_08P-g@mail.gmail.com> (raw)
In-Reply-To: <CAHkK2boS2ffnz+vz1jRqKHy1vQcrcd6FHEdWgY-btHZaCapdkA@mail.gmail.com>
Signed-Off-By: Steven Walter <stevenrwalter@gmail.com>
On Tue, May 15, 2012 at 8:09 AM, Avishay Lavie <avishay.lavie@gmail.com> wrote:
> (Adding previous authors of git-svn.perl)
>
> ---------- Forwarded message ----------
> From: Avishay Lavie <avishay.lavie@gmail.com>
> Date: Tue, May 15, 2012 at 12:09 PM
> Subject: PATCH: git-svn: support rebase --preserve-merges
> To: git@vger.kernel.org
>
>
> From: Avishay Lavie <avishay.lavie@gmail.com>
> Date: Tue, 15 May 2012 11:45:50 +0300
> Subject: [PATCH] git-svn: support rebase --preserve-merges
>
> When git svn rebase is performed after an unpushed merge, the
> rebase operation follows both parents and replays both the user's
> local commits and those from the merged branch. This is usually
> not the intended behavior.
> This patch adds support for the --preserve-merges/-p flag which
> allows for a better workflow by re-applying merge commits as merges.
>
> Signed-off-by: Avishay Lavie <avishay.lavie@gmail.com>
> ---
> Documentation/git-svn.txt | 2 ++
> git-svn.perl | 4 +++-
> 2 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt
> index 34ee785..0d52997 100644
> --- a/Documentation/git-svn.txt
> +++ b/Documentation/git-svn.txt
> @@ -572,6 +572,8 @@ config key: svn.repackflags
> --merge::
> -s<strategy>::
> --strategy=<strategy>::
> +-p::
> +--preserve-merges::
> These are only used with the 'dcommit' and 'rebase' commands.
> +
> Passed directly to 'git rebase' when using 'dcommit' if a
> diff --git a/git-svn.perl b/git-svn.perl
> index ca038ec..e86d60b 100755
> --- a/git-svn.perl
> +++ b/git-svn.perl
> @@ -84,7 +84,7 @@ my ($_stdin, $_help, $_edit,
> $_message, $_file, $_branch_dest,
> $_template, $_shared,
> $_version, $_fetch_all, $_no_rebase, $_fetch_parent,
> - $_merge, $_strategy, $_dry_run, $_local,
> + $_merge, $_strategy, $_preserve_merges, $_dry_run, $_local,
> $_prefix, $_no_checkout, $_url, $_verbose,
> $_git_format, $_commit_url, $_tag, $_merge_info, $_interactive);
> $Git::SVN::_follow_parent = 1;
> @@ -233,6 +233,7 @@ my %cmd = (
> 'local|l' => \$_local,
> 'fetch-all|all' => \$_fetch_all,
> 'dry-run|n' => \$_dry_run,
> + 'preserve-merges|p' => \$_preserve_merges
> %fc_opts } ],
> 'commit-diff' => [ \&cmd_commit_diff,
> 'Commit a diff between two trees',
> @@ -1570,6 +1571,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;
> @cmd;
> }
>
> --
> 1.7.9.msysgit.0
--
-Steven Walter <stevenrwalter@gmail.com>
"The rotter who simpers that he sees no difference between the power
of the dollar and the power of the whip, ought to learn the difference
on his own hide."
-Francisco d'Anconia, Atlas Shrugged
prev parent reply other threads:[~2012-05-22 17:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-15 12:09 [PATCH] git-svn: support rebase --preserve-merges Avishay Lavie
2012-05-22 17:32 ` Steven Walter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAK8d-aLFr3Bk6LU-H8FgR8kKQM9sLvectneZ1QnaHDzg_08P-g@mail.gmail.com \
--to=stevenrwalter@gmail.com \
--cc=avarab@gmail.com \
--cc=avishay.lavie@gmail.com \
--cc=git@vger.kernel.org \
--cc=normalperson@yhbt.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).