From: Eric Wong <normalperson@yhbt.net>
To: "Jörg Sommer" <joerg@alea.gnuu.de>
Cc: git@vger.kernel.org, "Karl Hasselström" <kha@treskal.com>
Subject: Re: Commit a series of patches to SVN without rebase
Date: Fri, 21 Dec 2007 20:53:40 -0800 [thread overview]
Message-ID: <20071222045340.GA21524@soma> (raw)
In-Reply-To: <20071220164044.GA22683@alea.gnuu.de>
Jörg Sommer <joerg@alea.gnuu.de> wrote:
> Hi,
>
> I've a number of patches in git I want to send to a SVN repository. git
> svn dcommit does a rebase after each commit which makes the whole commit
> takes very long. Is it possible to skip the rebase? All patches are in
> one branch without merges, a simple chain. Is it save to use --no-rebase
> in this case?
Right now, only if the changes don't depend on each other (they all
modify different files).
The following patch should allow dcommit of multiple changes that depend
on each other with --no-rebase. --no-rebase was Karl's idea, and I've
never used it myself so I don't know how it works.
I don't have time to write a test case for --no-rebase at the
moment, but any reports/feedback would be helpful. Thanks.
diff --git a/git-svn.perl b/git-svn.perl
index c51f1e7..9b1113a 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -418,7 +418,7 @@ sub cmd_dcommit {
warn "Attempting to commit more than one change while ",
"--no-rebase is enabled.\n",
"If these changes depend on each other, re-running ",
- "without --no-rebase will be required."
+ "without --no-rebase may be required."
}
while (1) {
my $d = shift @$linear_refs or last;
@@ -453,6 +453,7 @@ sub cmd_dcommit {
$parents->{$d};
}
$_fetch_all ? $gs->fetch_all : $gs->fetch;
+ $last_rev = $cmt_rev;
next if $_no_rebase;
# we always want to rebase against the current HEAD,
@@ -512,7 +513,6 @@ sub cmd_dcommit {
$parents = \%p;
$linear_refs = \@l;
}
- $last_rev = $cmt_rev;
}
}
unlink $gs->{index};
--
Eric Wong
next prev parent reply other threads:[~2007-12-22 4:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-20 16:40 Commit a series of patches to SVN without rebase Jörg Sommer
2007-12-22 4:53 ` Eric Wong [this message]
2007-12-23 23:59 ` Jörg Sommer
2008-01-02 3:11 ` Eric Wong
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071222045340.GA21524@soma \
--to=normalperson@yhbt.net \
--cc=git@vger.kernel.org \
--cc=joerg@alea.gnuu.de \
--cc=kha@treskal.com \
/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.
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 NNTP newsgroup(s).