Skip to content

Commit

Permalink
git-svn: match SVN 1.5 behaviour of info' on unknown item
Browse files Browse the repository at this point in the history
Previously 'git svn info unknown-file' only announced its failure (in
the SVN 1.4 style, "not a versioned resource"), and exited
successfully.

It is desirable to actually exit with failure, so change the code to
exit(1) under this condition.  Since that is already halfway SVN 1.5
compatibility, also change the error output to match 1.5.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Eric Wong <normalperson@yhbt.net>
  • Loading branch information
Thomas Rast authored and Eric Wong committed Sep 5, 2008
1 parent 05427b9 commit 2cf3e3a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions git-svn.perl
Original file line number Diff line number Diff line change
Expand Up @@ -832,8 +832,8 @@ sub cmd_info {
my ($file_type, $diff_status) = find_file_type_and_diff_status($path);

if (!$file_type && !$diff_status) {
print STDERR "$path: (Not a versioned resource)\n\n";
return;
print STDERR "svn: '$path' is not under version control\n";
exit 1;
}

my ($url, $rev, $uuid, $gs) = working_head_info('HEAD');
Expand Down

0 comments on commit 2cf3e3a

Please sign in to comment.