git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] git-svn: find-rev error message when missing arg

From
Marc-Andre Lureau (elmarco) <marcandre.lureau@gmail.com>
Date
Mar 11, 2008, 01:52 UTC
Message-ID
<1205200346-5537-1-git-send-email-marcandre.lureau@gmail.com>
Just let the user know that a revision argument is missing instead of a perl error. This error message mimic the "init" error message, but could be improved.
---
 git-svn.perl |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index 1195569..2ee7ca5 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -522,7 +522,8 @@ sub cmd_dcommit {
 }
 
 sub cmd_find_rev {
-	my $revision_or_hash = shift;
+	my $revision_or_hash = shift or die "SVN or git revison required ",
+	                                    "as a command-line argument\n";
 	my $result;
 	if ($revision_or_hash =~ /^r\d+$/) {
 		my $head = shift;
-- 
1.5.4.4.482.ga8b1
Next: Eric Wong
Message 1 of 5 in “git-svn: find-rev error message when missing arg”
  1. git-svn: find-rev error message when missing argMarc-Andre Lureau (elmarco), Mar 11, 2008
  2. Eric WongMar 11, 2008
  3. git-svn: find-rev error message when missing argMarc-Andre Lureau, Mar 11, 2008
  4. Marc-André LureauMar 11, 2008
  5. Eric WongMar 11, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.