From: ojab <ojab@ojab.ru>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Fix `git svn rebase` if top-level HEAD directory exist
Date: Wed, 05 Jun 2013 09:32:50 +0400 [thread overview]
Message-ID: <51AECD82.4070908@ojab.ru> (raw)
In-Reply-To: <20130604074956.GA13555@sigill.intra.peff.net>
[-- Attachment #1: Type: text/plain, Size: 620 bytes --]
On 04.06.2013 11:49, Jeff King wrote:
> This rationale should probably go in the commit message.
Done
>
> We prefer patches to be inline in the email; these lines can be
> dropped, as they are picked up from your email headers.
AFAIK Thunderbird brakes spaces, so better safe, than sorry :)
> Do you mind providing a real name? The point of Signed-off-by is for
> licensing and attribution.
Done (but i doubt that such a patch can be copyrighted).
> Looks obviously correct to me. I did a quick grep, and there is one
> other spot that probably should get the same treatment:
Yep, already found it.
//wbr ojab
[-- Attachment #2: 0001-Fix-git-svn-rebase-dcommit-if-top-level-HEAD-directo.patch --]
[-- Type: text/plain, Size: 1414 bytes --]
From 0251b7f2032e2050d2b6d2cbc0960471c996b058 Mon Sep 17 00:00:00 2001
From: ojab <ojab@ojab.ru>
Date: Tue, 4 Jun 2013 11:28:16 +0400
Subject: [PATCH] Fix `git svn` `rebase` & `dcommit` if top-level HEAD
directory exist
$ git svn rebase
fatal: ambiguous argument 'HEAD': both revision and filename
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
rev-list --first-parent --pretty=medium HEAD: command returned error: 128
Signed-off-by: Slava Kardakov <ojab@ojab.ru>
---
git-svn.perl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index d070de0..36083c1 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -831,7 +831,7 @@ sub dcommit_rebase {
sub cmd_dcommit {
my $head = shift;
command_noisy(qw/update-index --refresh/);
- git_cmd_try { command_oneline(qw/diff-index --quiet HEAD/) }
+ git_cmd_try { command_oneline(qw/diff-index --quiet HEAD --/) }
'Cannot dcommit with a dirty index. Commit your changes first, '
. "or stash them with `git stash'.\n";
$head ||= 'HEAD';
@@ -1932,7 +1932,7 @@ sub cmt_sha2rev_batch {
sub working_head_info {
my ($head, $refs) = @_;
my @args = qw/rev-list --first-parent --pretty=medium/;
- my ($fh, $ctx) = command_output_pipe(@args, $head);
+ my ($fh, $ctx) = command_output_pipe(@args, $head, "--");
my $hash;
my %max;
while (<$fh>) {
--
1.8.2
prev parent reply other threads:[~2013-06-05 5:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-04 7:32 [PATCH] Fix `git svn rebase` if top-level HEAD directory exist ojab
2013-06-04 7:49 ` Jeff King
2013-06-05 5:32 ` ojab [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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51AECD82.4070908@ojab.ru \
--to=ojab@ojab.ru \
--cc=git@vger.kernel.org \
--cc=peff@peff.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.