[PATCH] git-svn: sort the options in the --help message.

Subsystems: the rest

DORMANTno replies

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

[PATCH] git-svn: sort the options in the --help message.

From: Benoit Sigoure <hidden>
Date: 2016-06-15 22:43:46

	* git-svn.perl (&usage): Sort the various options.

Signed-off-by: Benoit Sigoure <redacted>
---
It always annoys me when I read the output of git svn <cmd> --help that the
options are printed in no particular order.

 git-svn.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index 22bb47b..4900f57 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -252,7 +252,7 @@ Usage: $0 <command> [options] [arguments]\n
 		next if $cmd && $cmd ne $_;
 		next if /^multi-/; # don't show deprecated commands
 		print $fd '  ',pack('A17',$_),$cmd{$_}->[1],"\n";
-		foreach (keys %{$cmd{$_}->[2]}) {
+		foreach (sort keys %{$cmd{$_}->[2]}) {
 			# mixed-case options are for .git/config only
 			next if /[A-Z]/ && /^[a-z]+$/i;
 			# prints out arguments as they should be passed:
-- 
1.5.3.4.398.g859b

Re: [PATCH] git-svn: sort the options in the --help message.

From: Eric Wong <hidden>
Date: 2016-06-15 22:43:46

Benoit Sigoure [off-list ref] wrote:
	* git-svn.perl (&usage): Sort the various options.

Signed-off-by: Benoit Sigoure <redacted>
---
It always annoys me when I read the output of git svn <cmd> --help that the
options are printed in no particular order.
The above sentence belongs in the commit message.

Thanks,

Acked-by: Eric Wong <redacted>
quoted hunk
 git-svn.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index 22bb47b..4900f57 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -252,7 +252,7 @@ Usage: $0 <command> [options] [arguments]\n
 		next if $cmd && $cmd ne $_;
 		next if /^multi-/; # don't show deprecated commands
 		print $fd '  ',pack('A17',$_),$cmd{$_}->[1],"\n";
-		foreach (keys %{$cmd{$_}->[2]}) {
+		foreach (sort keys %{$cmd{$_}->[2]}) {
 			# mixed-case options are for .git/config only
 			next if /[A-Z]/ && /^[a-z]+$/i;
 			# prints out arguments as they should be passed:
-- 
Eric Wong
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help