summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c8af1de)
raw | patch | inline | side by side (parent: c8af1de)
author | Matthieu Moy <Matthieu.Moy@imag.fr> | |
Thu, 24 Apr 2008 18:06:36 +0000 (20:06 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 30 Apr 2008 06:11:57 +0000 (23:11 -0700) |
The command
git svn clone (URL of an empty SVN repo here)
works, creates an empty git repository. I can perform the initial
commit there, but then, "git svn dcommit" says :
Use of uninitialized value in concatenation (.) or string at .../git-svn line 414.
Committing to ...
Unable to determine upstream SVN information from HEAD history
I guess a correct management of the initial commit in git-svn would be
hard to implement, but at least, the error message can be improved.
First step is something like the patch below, and better would be for
"git svn clone" to warn that it won't be able to do much with the
cloned repo.
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git svn clone (URL of an empty SVN repo here)
works, creates an empty git repository. I can perform the initial
commit there, but then, "git svn dcommit" says :
Use of uninitialized value in concatenation (.) or string at .../git-svn line 414.
Committing to ...
Unable to determine upstream SVN information from HEAD history
I guess a correct management of the initial commit in git-svn would be
hard to implement, but at least, the error message can be improved.
First step is something like the patch below, and better would be for
"git svn clone" to warn that it won't be able to do much with the
cloned repo.
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff-lib.c | patch | blob | history | |
git-svn.perl | patch | blob | history |
diff --git a/diff-lib.c b/diff-lib.c
index 069e4507ae7caa70f79d5369bc61dfefd0f174e2..cfd629da48526f5949124b5d9baeb52dfadd5f64 100644 (file)
--- a/diff-lib.c
+++ b/diff-lib.c
DIFF_OPT_SET(&revs->diffopt, EXIT_WITH_STATUS);
break;
}
+ if (nongit && argc != i + 2)
+ die("git diff [--no-index] takes two paths");
+
if (argc != i + 2 || (!is_outside_repo(argv[i + 1], nongit, prefix) &&
!is_outside_repo(argv[i], nongit, prefix)))
return -1;
diff --git a/git-svn.perl b/git-svn.perl
index b1510495a7f003991a37d0810c551404c6c1252c..711e7b7eb9274c9de292d6f36fca9a9f0baf6318 100755 (executable)
--- a/git-svn.perl
+++ b/git-svn.perl
$head ||= 'HEAD';
my @refs;
my ($url, $rev, $uuid, $gs) = working_head_info($head, \@refs);
- print "Committing to $url ...\n";
+ if ($url) {
+ print "Committing to $url ...\n";
+ }
unless ($gs) {
die "Unable to determine upstream SVN information from ",
- "$head history\n";
+ "$head history.\nPerhaps the repository is empty.";
}
my $last_rev;
my ($linear_refs, $parents) = linearize_history($gs, \@refs);