summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--diff-lib.c3
-rwxr-xr-xgit-svn.perl6
2 files changed, 7 insertions, 2 deletions
diff --git a/diff-lib.c b/diff-lib.c
index 069e4507ae..cfd629da48 100644
--- a/diff-lib.c
+++ b/diff-lib.c
@@ -264,6 +264,9 @@ int setup_diff_no_index(struct rev_info *revs,
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 b1510495a7..711e7b7eb9 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -410,10 +410,12 @@ sub cmd_dcommit {
$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);