Skip to contentSkip to conversation

git-svn: use a lowercase "usage:" string

PATCH New David Aguilar 1 participant 4 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 git-svn: use a lowercase "usage:" string

Make the usage string consistent with Git.

---
I'm not sure why this wasn't caught in my first round. It should probably be squashed into the 02/16 from v2.

 git-svn.perl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
git-svn.perl +2 -2
index a93166f..6c7bd95 100755
@@ -534,7 +534,7 @@ sub cmd_fetch {
 	}
 	my ($remote) = @_;
 	if (@_ > 1) {
-		die "Usage: $0 fetch [--all] [--parent] [svn-remote]\n";
+		die "usage: $0 fetch [--all] [--parent] [svn-remote]\n";
 	}
 	$Git::SVN::no_reuse_existing = undef;
 	if ($_fetch_parent) {
@@ -1404,7 +1404,7 @@ sub cmd_multi_fetch {
 # this command is special because it requires no metadata
 sub cmd_commit_diff {
 	my ($ta, $tb, $url) = @_;
-	my $usage = "Usage: $0 commit-diff -r<revision> ".
+	my $usage = "usage: $0 commit-diff -r<revision> ".
 	            "<tree-ish> <tree-ish> [<URL>]";
 	fatal($usage) if (!defined $ta || !defined $tb);
 	my $svn_path = '';
Signature · 1 line
1.7.12.4 (Apple Git-37)
#1 lore raw

PATCH 2/4 tests: use a lowercase "usage:" string

Adjust test commands and test suites so that their usage strings are consistent with Git.

---
 t/lib-git-svn.sh          | 2 +-
 t/t1509/prepare-chroot.sh | 2 +-
 test-chmtime.c            | 2 +-
 test-delta.c              | 2 +-
 test-genrandom.c          | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
t/lib-git-svn.sh +1 -1
index 199f22c..c5e55b1 100644
@@ -148,7 +148,7 @@ stop_httpd () {
 convert_to_rev_db () {
 	"$PERL_PATH" -w -- - "$@" <<\EOF
 use strict;
-@ARGV == 2 or die "Usage: convert_to_rev_db <input> <output>";
+@ARGV == 2 or die "usage: convert_to_rev_db <input> <output>";
 open my $wr, '+>', $ARGV[1] or die "$!: couldn't open: $ARGV[1]";
 open my $rd, '<', $ARGV[0] or die "$!: couldn't open: $ARGV[0]";
 my $size = (stat($rd))[7];
t/t1509/prepare-chroot.sh +1 -1
index c5334a8..6269117 100755
@@ -14,7 +14,7 @@ xmkdir() {
 
 R="$1"
 
-[ -n "$R" ] || die "Usage: prepare-chroot.sh <root>"
+[ -n "$R" ] || die "usage: prepare-chroot.sh <root>"
 [ -x git ] || die "This script needs to be executed at git source code's top directory"
 [ -x /bin/busybox ] || die "You need busybox"
 
test-chmtime.c +1 -1
index 92713d1..02b42ba 100644
@@ -114,6 +114,6 @@ int main(int argc, const char *argv[])
 	return 0;
 
 usage:
-	fprintf(stderr, "Usage: %s %s\n", argv[0], usage_str);
+	fprintf(stderr, "usage: %s %s\n", argv[0], usage_str);
 	return -1;
 }
test-delta.c +1 -1
index af40a3c..4595cd6 100644
@@ -23,7 +23,7 @@ int main(int argc, char *argv[])
 	unsigned long from_size, data_size, out_size;
 
 	if (argc != 5 || (strcmp(argv[1], "-d") && strcmp(argv[1], "-p"))) {
-		fprintf(stderr, "Usage: %s\n", usage_str);
+		fprintf(stderr, "usage: %s\n", usage_str);
 		return 1;
 	}
 
test-genrandom.c +1 -1
index b3c28d9..54824d0 100644
@@ -12,7 +12,7 @@ int main(int argc, char *argv[])
 	unsigned char *c;
 
 	if (argc < 2 || argc > 3) {
-		fprintf(stderr, "Usage: %s <seed_string> [<size>]\n", argv[0]);
+		fprintf(stderr, "usage: %s <seed_string> [<size>]\n", argv[0]);
 		return 1;
 	}
 
Signature · 1 line
1.7.12.4 (Apple Git-37)
#2 lore raw

PATCH 3/4 contrib/examples/git-remote.perl: use a lowercase "usage:" string

Make the usage string consistent with Git.

---
 contrib/examples/git-remote.perl | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
contrib/examples/git-remote.perl +4 -4
index b549a3c..d42df7b 100755
@@ -380,7 +380,7 @@ elsif ($ARGV[0] eq 'show') {
 		}
 	}
 	if ($i >= @ARGV) {
-		print STDERR "Usage: git remote show <remote>\n";
+		print STDERR "usage: git remote show <remote>\n";
 		exit(1);
 	}
 	my $status = 0;
@@ -410,7 +410,7 @@ elsif ($ARGV[0] eq 'prune') {
 		}
 	}
 	if ($i >= @ARGV) {
-		print STDERR "Usage: git remote prune <remote>\n";
+		print STDERR "usage: git remote prune <remote>\n";
 		exit(1);
 	}
 	my $status = 0;
@@ -458,13 +458,13 @@ elsif ($ARGV[0] eq 'add') {
 }
 elsif ($ARGV[0] eq 'rm') {
 	if (@ARGV <= 1) {
-		print STDERR "Usage: git remote rm <remote>\n";
+		print STDERR "usage: git remote rm <remote>\n";
 		exit(1);
 	}
 	exit(rm_remote($ARGV[1]));
 }
 else {
-	print STDERR "Usage: git remote\n";
+	print STDERR "usage: git remote\n";
 	print STDERR "       git remote add <name> <url>\n";
 	print STDERR "       git remote rm <name>\n";
 	print STDERR "       git remote show <name>\n";
Signature · 1 line
1.7.12.4 (Apple Git-37)
#3 lore raw

PATCH 4/4 contrib/mw-to-git/t/install-wiki.sh: use a lowercase "usage:" string

Make the usage string consistent with Git.

---
 contrib/mw-to-git/t/install-wiki.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
contrib/mw-to-git/t/install-wiki.sh +1 -1
index c6d6fa3..70a53f6 100755
@@ -15,7 +15,7 @@ fi
 
 . "$WIKI_TEST_DIR"/test-gitmw-lib.sh
 usage () {
-	echo "Usage: "
+	echo "usage: "
 	echo "	./install-wiki.sh <install | delete | --help>"
 	echo "		install | -i :	Install a wiki on your computer."
 	echo "		delete | -d : Delete the wiki and all its pages and "
Signature · 1 line
1.7.12.4 (Apple Git-37)