{"thread":{"id":"32992","subject":"[PATCH 04/16] git-merge-one-file: make usage text consistent","startedAt":"2013-02-24T00:20:38Z","lastAt":"2013-02-24T00:37:21Z","messageCount":20,"participants":["David Aguilar","Jonathan Nieder"],"isPatch":true,"patchVersion":1,"patchTotal":16},"messages":[{"id":"210133","messageId":"1361665254-42866-1-git-send-email-davvid@gmail.com","threadId":"32992","inReplyTo":null,"subject":"[PATCH 00/16] make usage text consistent in git commands","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2013-02-24T00:20:38Z","receivedAt":"2013-02-24T00:20:38Z","isPatch":true,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"Various helper commands around Git say \"Usage: ...\" when\ninvoked as \"git $cmd -h\".  This is inconsitent with the core\ngit commands which all use the lowercase \"usage: ...\" form.\n\nAdjust these so that they match the convention used by\nbuiltin/help.c and git.c.\n\nI fixed a tiny problem in import-zips.py while I was in\nthere, though it's unlikely that anyone uses such an old\nPython these days.\n\nThere are still one or two results for \"git grep Usage:\"\nnear the tests, but end users do not ever see them so I\nfigured it was best to leave them as-is.\n\nDavid Aguilar (16):\n  git-sh-setup: make usage text consistent\n  git-svn: make usage text consistent\n  git-relink: make usage text consistent\n  git-merge-one-file: make usage text consistent\n  git-archimport: make usage text consistent\n  git-cvsexportcommit: make usage text consistent\n  git-cvsimport: make usage text consistent\n  git-cvsimport: make usage text consistent\n  contrib/credential: make usage text consistent\n  contrib/fast-import: make usage text consistent\n  contrib/fast-import/import-zips.py: fix broken error message\n  contrib/fast-import/import-zips.py: use spaces instead of tabs\n  contrib/examples: make usage text consistent\n  contrib/hooks/setgitperms.perl: make usage text consistent\n  templates/hooks--update.sample: make usage text consistent\n  Documentation/user-manual.txt: make usage text consistent\n\n Documentation/user-manual.txt                      |  4 +-\n .../gnome-keyring/git-credential-gnome-keyring.c   |  2 +-\n .../osxkeychain/git-credential-osxkeychain.c       |  2 +-\n .../credential/wincred/git-credential-wincred.c    |  2 +-\n contrib/examples/git-remote.perl                   |  2 +-\n contrib/examples/git-svnimport.perl                |  2 +-\n contrib/fast-import/git-import.perl                |  2 +-\n contrib/fast-import/git-import.sh                  |  2 +-\n contrib/fast-import/import-zips.py                 | 98 +++++++++++-----------\n contrib/hooks/setgitperms.perl                     |  2 +-\n git-archimport.perl                                |  2 +-\n git-cvsexportcommit.perl                           |  2 +-\n git-cvsimport.perl                                 |  2 +-\n git-cvsserver.perl                                 |  2 +-\n git-merge-one-file.sh                              |  2 +-\n git-relink.perl                                    |  2 +-\n git-sh-setup.sh                                    |  6 +-\n git-svn.perl                                       |  2 +-\n templates/hooks--update.sample                     |  2 +-\n 19 files changed, 70 insertions(+), 70 deletions(-)\n\n-- \n1.8.2.rc0.247.g811e0c0\n"},{"id":"210132","messageId":"1361665254-42866-2-git-send-email-davvid@gmail.com","threadId":"32992","inReplyTo":"1361665254-42866-1-git-send-email-davvid@gmail.com","subject":"[PATCH 01/16] git-sh-setup: make usage text consistent","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2013-02-24T00:20:39Z","receivedAt":"2013-02-24T00:20:39Z","isPatch":true,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"mergetool, bisect, and other commands that use\ngit-sh-setup print a usage string that is inconsistent\nwith the rest of Git when they are invoked as \"git $cmd -h\".\n\nThe compiled builtins use the lowercase \"usage:\" string\nbut these commands say \"Usage:\".  Adjust the shell library\nto make these consistent.\n\nSigned-off-by: David Aguilar <davvid@gmail.com>\n---\n git-sh-setup.sh | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/git-sh-setup.sh b/git-sh-setup.sh\nindex 795edd2..9cfbe7f 100644\n--- a/git-sh-setup.sh\n+++ b/git-sh-setup.sh\n@@ -84,14 +84,14 @@ if test -n \"$OPTIONS_SPEC\"; then\n else\n \tdashless=$(basename \"$0\" | sed -e 's/-/ /')\n \tusage() {\n-\t\tdie \"Usage: $dashless $USAGE\"\n+\t\tdie \"usage: $dashless $USAGE\"\n \t}\n \n \tif [ -z \"$LONG_USAGE\" ]\n \tthen\n-\t\tLONG_USAGE=\"Usage: $dashless $USAGE\"\n+\t\tLONG_USAGE=\"usage: $dashless $USAGE\"\n \telse\n-\t\tLONG_USAGE=\"Usage: $dashless $USAGE\n+\t\tLONG_USAGE=\"usage: $dashless $USAGE\n \n $LONG_USAGE\"\n \tfi\n-- \n1.8.2.rc0.247.g811e0c0\n"},{"id":"210131","messageId":"1361665254-42866-3-git-send-email-davvid@gmail.com","threadId":"32992","inReplyTo":"1361665254-42866-2-git-send-email-davvid@gmail.com","subject":"[PATCH 02/16] git-svn: make usage text consistent","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2013-02-24T00:20:40Z","receivedAt":"2013-02-24T00:20:40Z","isPatch":true,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"Use a lowercase \"usage:\" string for consistency with Git.\n\nSigned-off-by: David Aguilar <davvid@gmail.com>\n---\n git-svn.perl | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex b46795f..a93166f 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -382,7 +382,7 @@ sub usage {\n \tmy $fd = $exit ? \\*STDERR : \\*STDOUT;\n \tprint $fd <<\"\";\n git-svn - bidirectional operations between a single Subversion tree and git\n-Usage: git svn <command> [options] [arguments]\\n\n+usage: git svn <command> [options] [arguments]\\n\n \n \tprint $fd \"Available commands:\\n\" unless $cmd;\n \n-- \n1.8.2.rc0.247.g811e0c0\n"},{"id":"210145","messageId":"1361665254-42866-4-git-send-email-davvid@gmail.com","threadId":"32992","inReplyTo":"1361665254-42866-3-git-send-email-davvid@gmail.com","subject":"[PATCH 03/16] git-relink: make usage text consistent","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2013-02-24T00:20:41Z","receivedAt":"2013-02-24T00:20:41Z","isPatch":true,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"Use a lowercase \"usage:\" string for consistency with Git.\n\nSigned-off-by: David Aguilar <davvid@gmail.com>\n---\n git-relink.perl | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/git-relink.perl b/git-relink.perl\nindex f29285c..236a352 100755\n--- a/git-relink.perl\n+++ b/git-relink.perl\n@@ -163,7 +163,7 @@ sub link_two_files($$) {\n \n \n sub usage() {\n-\tprint(\"Usage: git relink [--safe] <dir>... <master_dir> \\n\");\n+\tprint(\"usage: git relink [--safe] <dir>... <master_dir> \\n\");\n \tprint(\"All directories should contain a .git/objects/ subdirectory.\\n\");\n \tprint(\"Options\\n\");\n \tprint(\"\\t--safe\\t\" .\n-- \n1.8.2.rc0.247.g811e0c0\n"},{"id":"210130","messageId":"1361665254-42866-5-git-send-email-davvid@gmail.com","threadId":"32992","inReplyTo":"1361665254-42866-4-git-send-email-davvid@gmail.com","subject":"[PATCH 04/16] git-merge-one-file: make usage text consistent","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2013-02-24T00:20:42Z","receivedAt":"2013-02-24T00:20:42Z","isPatch":true,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"Use a lowercase \"usage:\" string for consistency with Git.\n\nSigned-off-by: David Aguilar <davvid@gmail.com>\n---\n git-merge-one-file.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/git-merge-one-file.sh b/git-merge-one-file.sh\nindex f612cb8..3373c04 100755\n--- a/git-merge-one-file.sh\n+++ b/git-merge-one-file.sh\n@@ -18,7 +18,7 @@\n \n USAGE='<orig blob> <our blob> <their blob> <path>'\n USAGE=\"$USAGE <orig mode> <our mode> <their mode>\"\n-LONG_USAGE=\"Usage: git merge-one-file $USAGE\n+LONG_USAGE=\"usage: git merge-one-file $USAGE\n \n Blob ids and modes should be empty for missing files.\"\n \n-- \n1.8.2.rc0.247.g811e0c0\n"},{"id":"210142","messageId":"1361665254-42866-6-git-send-email-davvid@gmail.com","threadId":"32992","inReplyTo":"1361665254-42866-5-git-send-email-davvid@gmail.com","subject":"[PATCH 05/16] git-archimport: make usage text consistent","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2013-02-24T00:20:43Z","receivedAt":"2013-02-24T00:20:43Z","isPatch":true,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"Use a lowercase \"usage:\" string for consistency with Git.\n\nSigned-off-by: David Aguilar <davvid@gmail.com>\n---\n git-archimport.perl | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/git-archimport.perl b/git-archimport.perl\nindex bc32f18..9cb123a 100755\n--- a/git-archimport.perl\n+++ b/git-archimport.perl\n@@ -75,7 +75,7 @@ our($opt_h,$opt_f,$opt_v,$opt_T,$opt_t,$opt_D,$opt_a,$opt_o);\n \n sub usage() {\n     print STDERR <<END;\n-Usage: git archimport     # fetch/update GIT from Arch\n+usage: git archimport     # fetch/update GIT from Arch\n        [ -h ] [ -v ] [ -o ] [ -a ] [ -f ] [ -T ] [ -D depth ] [ -t tempdir ]\n        repository/arch-branch [ repository/arch-branch] ...\n END\n-- \n1.8.2.rc0.247.g811e0c0\n"},{"id":"210134","messageId":"1361665254-42866-7-git-send-email-davvid@gmail.com","threadId":"32992","inReplyTo":"1361665254-42866-6-git-send-email-davvid@gmail.com","subject":"[PATCH 06/16] git-cvsexportcommit: make usage text consistent","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2013-02-24T00:20:44Z","receivedAt":"2013-02-24T00:20:44Z","isPatch":true,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"Use a lowercase \"usage:\" string for consistency with Git.\n\nSigned-off-by: David Aguilar <davvid@gmail.com>\n---\n git-cvsexportcommit.perl | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/git-cvsexportcommit.perl b/git-cvsexportcommit.perl\nindex e6bf252..d13f02d 100755\n--- a/git-cvsexportcommit.perl\n+++ b/git-cvsexportcommit.perl\n@@ -420,7 +420,7 @@ sleep(1);\n \n sub usage {\n \tprint STDERR <<END;\n-Usage: GIT_DIR=/path/to/.git git cvsexportcommit [-h] [-p] [-v] [-c] [-f] [-u] [-k] [-w cvsworkdir] [-m msgprefix] [ parent ] commit\n+usage: GIT_DIR=/path/to/.git git cvsexportcommit [-h] [-p] [-v] [-c] [-f] [-u] [-k] [-w cvsworkdir] [-m msgprefix] [ parent ] commit\n END\n \texit(1);\n }\n-- \n1.8.2.rc0.247.g811e0c0\n"},{"id":"210135","messageId":"1361665254-42866-8-git-send-email-davvid@gmail.com","threadId":"32992","inReplyTo":"1361665254-42866-7-git-send-email-davvid@gmail.com","subject":"[PATCH 07/16] git-cvsimport: make usage text consistent","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2013-02-24T00:20:45Z","receivedAt":"2013-02-24T00:20:45Z","isPatch":true,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"Use a lowercase \"usage:\" string for consistency with Git.\n\nSigned-off-by: David Aguilar <davvid@gmail.com>\n---\n git-cvsimport.perl | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/git-cvsimport.perl b/git-cvsimport.perl\nindex 344f120..73d367c 100755\n--- a/git-cvsimport.perl\n+++ b/git-cvsimport.perl\n@@ -38,7 +38,7 @@ sub usage(;$) {\n \tmy $msg = shift;\n \tprint(STDERR \"Error: $msg\\n\") if $msg;\n \tprint STDERR <<END;\n-Usage: git cvsimport     # fetch/update GIT from CVS\n+usage: git cvsimport     # fetch/update GIT from CVS\n        [-o branch-for-HEAD] [-h] [-v] [-d CVSROOT] [-A author-conv-file]\n        [-p opts-for-cvsps] [-P file] [-C GIT_repository] [-z fuzz] [-i] [-k]\n        [-u] [-s subst] [-a] [-m] [-M regex] [-S regex] [-L commitlimit]\n-- \n1.8.2.rc0.247.g811e0c0\n"},{"id":"210136","messageId":"1361665254-42866-9-git-send-email-davvid@gmail.com","threadId":"32992","inReplyTo":"1361665254-42866-8-git-send-email-davvid@gmail.com","subject":"[PATCH 08/16] git-cvsimport: make usage text consistent","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2013-02-24T00:20:46Z","receivedAt":"2013-02-24T00:20:46Z","isPatch":true,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"Use a lowercase \"usage:\" string for consistency with Git.\n\nSigned-off-by: David Aguilar <davvid@gmail.com>\n---\n git-cvsserver.perl | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/git-cvsserver.perl b/git-cvsserver.perl\nindex 3679074..f1c3f49 100755\n--- a/git-cvsserver.perl\n+++ b/git-cvsserver.perl\n@@ -107,7 +107,7 @@ my $work =\n $log->info(\"--------------- STARTING -----------------\");\n \n my $usage =\n-    \"Usage: git cvsserver [options] [pserver|server] [<directory> ...]\\n\".\n+    \"usage: git cvsserver [options] [pserver|server] [<directory> ...]\\n\".\n     \"    --base-path <path>  : Prepend to requested CVSROOT\\n\".\n     \"                          Can be read from GIT_CVSSERVER_BASE_PATH\\n\".\n     \"    --strict-paths      : Don't allow recursing into subdirectories\\n\".\n-- \n1.8.2.rc0.247.g811e0c0\n"},{"id":"210139","messageId":"1361665254-42866-10-git-send-email-davvid@gmail.com","threadId":"32992","inReplyTo":"1361665254-42866-9-git-send-email-davvid@gmail.com","subject":"[PATCH 09/16] contrib/credential: make usage text consistent","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2013-02-24T00:20:47Z","receivedAt":"2013-02-24T00:20:47Z","isPatch":true,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"Use a lowercase \"usage:\" string for consistency with Git.\n\nSigned-off-by: David Aguilar <davvid@gmail.com>\n---\n contrib/credential/gnome-keyring/git-credential-gnome-keyring.c | 2 +-\n contrib/credential/osxkeychain/git-credential-osxkeychain.c     | 2 +-\n contrib/credential/wincred/git-credential-wincred.c             | 2 +-\n 3 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/contrib/credential/gnome-keyring/git-credential-gnome-keyring.c b/contrib/credential/gnome-keyring/git-credential-gnome-keyring.c\nindex 41f61c5..f2cdefe 100644\n--- a/contrib/credential/gnome-keyring/git-credential-gnome-keyring.c\n+++ b/contrib/credential/gnome-keyring/git-credential-gnome-keyring.c\n@@ -401,7 +401,7 @@ static void usage(const char *name)\n \tconst char *basename = strrchr(name,'/');\n \n \tbasename = (basename) ? basename + 1 : name;\n-\tfprintf(stderr, \"Usage: %s <\", basename);\n+\tfprintf(stderr, \"usage: %s <\", basename);\n \twhile(try_op->name) {\n \t\tfprintf(stderr,\"%s\",(try_op++)->name);\n \t\tif(try_op->name)\ndiff --git a/contrib/credential/osxkeychain/git-credential-osxkeychain.c b/contrib/credential/osxkeychain/git-credential-osxkeychain.c\nindex 6beed12..3940202 100644\n--- a/contrib/credential/osxkeychain/git-credential-osxkeychain.c\n+++ b/contrib/credential/osxkeychain/git-credential-osxkeychain.c\n@@ -154,7 +154,7 @@ static void read_credential(void)\n int main(int argc, const char **argv)\n {\n \tconst char *usage =\n-\t\t\"Usage: git credential-osxkeychain <get|store|erase>\";\n+\t\t\"usage: git credential-osxkeychain <get|store|erase>\";\n \n \tif (!argv[1])\n \t\tdie(usage);\ndiff --git a/contrib/credential/wincred/git-credential-wincred.c b/contrib/credential/wincred/git-credential-wincred.c\nindex cbaec5f..6619492 100644\n--- a/contrib/credential/wincred/git-credential-wincred.c\n+++ b/contrib/credential/wincred/git-credential-wincred.c\n@@ -313,7 +313,7 @@ static void read_credential(void)\n int main(int argc, char *argv[])\n {\n \tconst char *usage =\n-\t    \"Usage: git credential-wincred <get|store|erase>\\n\";\n+\t    \"usage: git credential-wincred <get|store|erase>\\n\";\n \n \tif (!argv[1])\n \t\tdie(usage);\n-- \n1.8.2.rc0.247.g811e0c0\n"},{"id":"210146","messageId":"1361665254-42866-11-git-send-email-davvid@gmail.com","threadId":"32992","inReplyTo":"1361665254-42866-10-git-send-email-davvid@gmail.com","subject":"[PATCH 10/16] contrib/fast-import: make usage text consistent","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2013-02-24T00:20:48Z","receivedAt":"2013-02-24T00:20:48Z","isPatch":true,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"Use a lowercase \"usage:\" string for consistency with Git.\n\nSigned-off-by: David Aguilar <davvid@gmail.com>\n---\n contrib/fast-import/git-import.perl | 2 +-\n contrib/fast-import/git-import.sh   | 2 +-\n contrib/fast-import/import-zips.py  | 2 +-\n 3 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/contrib/fast-import/git-import.perl b/contrib/fast-import/git-import.perl\nindex f9fef6d..0891b9e 100755\n--- a/contrib/fast-import/git-import.perl\n+++ b/contrib/fast-import/git-import.perl\n@@ -7,7 +7,7 @@\n use strict;\n use File::Find;\n \n-my $USAGE = 'Usage: git-import branch import-message';\n+my $USAGE = 'usage: git-import branch import-message';\n my $branch = shift or die \"$USAGE\\n\";\n my $message = shift or die \"$USAGE\\n\";\n \ndiff --git a/contrib/fast-import/git-import.sh b/contrib/fast-import/git-import.sh\nindex 0ca7718..f8d803c 100755\n--- a/contrib/fast-import/git-import.sh\n+++ b/contrib/fast-import/git-import.sh\n@@ -5,7 +5,7 @@\n # but is meant to be a simple fast-import example.\n \n if [ -z \"$1\" -o -z \"$2\" ]; then\n-\techo \"Usage: git-import branch import-message\"\n+\techo \"usage: git-import branch import-message\"\n \texit 1\n fi\n \ndiff --git a/contrib/fast-import/import-zips.py b/contrib/fast-import/import-zips.py\nindex 5cec9b0..f54c65b 100755\n--- a/contrib/fast-import/import-zips.py\n+++ b/contrib/fast-import/import-zips.py\n@@ -19,7 +19,7 @@ if hexversion < 0x01060000:\n         sys.exit(1)\n \n if len(argv) < 2:\n-\tprint 'Usage:', argv[0], '<zipfile>...'\n+\tprint 'usage:', argv[0], '<zipfile>...'\n \texit(1)\n \n branch_ref = 'refs/heads/import-zips'\n-- \n1.8.2.rc0.247.g811e0c0\n"},{"id":"210143","messageId":"1361665254-42866-12-git-send-email-davvid@gmail.com","threadId":"32992","inReplyTo":"1361665254-42866-11-git-send-email-davvid@gmail.com","subject":"[PATCH 11/16] contrib/fast-import/import-zips.py: fix broken error message","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2013-02-24T00:20:49Z","receivedAt":"2013-02-24T00:20:49Z","isPatch":true,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"The 'sys' module is not imported but all of the bits\nwe want from it are.  Adjust the script to not fail\nwhen run on old Python versions and fix the inconsistent\nuse of tabs.\n\nSigned-off-by: David Aguilar <davvid@gmail.com>\n---\n contrib/fast-import/import-zips.py | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/contrib/fast-import/import-zips.py b/contrib/fast-import/import-zips.py\nindex f54c65b..b528798 100755\n--- a/contrib/fast-import/import-zips.py\n+++ b/contrib/fast-import/import-zips.py\n@@ -14,9 +14,9 @@ from time import mktime\n from zipfile import ZipFile\n \n if hexversion < 0x01060000:\n-        # The limiter is the zipfile module\n-        sys.stderr.write(\"import-zips.py: requires Python 1.6.0 or later.\\n\")\n-        sys.exit(1)\n+\t# The limiter is the zipfile module\n+\tstderr.write(\"import-zips.py: requires Python 1.6.0 or later.\\n\")\n+\texit(1)\n \n if len(argv) < 2:\n \tprint 'usage:', argv[0], '<zipfile>...'\n-- \n1.8.2.rc0.247.g811e0c0\n"},{"id":"210138","messageId":"1361665254-42866-13-git-send-email-davvid@gmail.com","threadId":"32992","inReplyTo":"1361665254-42866-12-git-send-email-davvid@gmail.com","subject":"[PATCH 12/16] contrib/fast-import/import-zips.py: use spaces instead of tabs","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2013-02-24T00:20:50Z","receivedAt":"2013-02-24T00:20:50Z","isPatch":true,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"Follow the conventional Python style by using 4-space indents\ninstead of hard tabs.\n\nSigned-off-by: David Aguilar <davvid@gmail.com>\n---\n contrib/fast-import/import-zips.py | 98 +++++++++++++++++++-------------------\n 1 file changed, 49 insertions(+), 49 deletions(-)\n\ndiff --git a/contrib/fast-import/import-zips.py b/contrib/fast-import/import-zips.py\nindex b528798..d12c296 100755\n--- a/contrib/fast-import/import-zips.py\n+++ b/contrib/fast-import/import-zips.py\n@@ -14,13 +14,13 @@ from time import mktime\n from zipfile import ZipFile\n \n if hexversion < 0x01060000:\n-\t# The limiter is the zipfile module\n-\tstderr.write(\"import-zips.py: requires Python 1.6.0 or later.\\n\")\n-\texit(1)\n+    # The limiter is the zipfile module\n+    stderr.write(\"import-zips.py: requires Python 1.6.0 or later.\\n\")\n+    exit(1)\n \n if len(argv) < 2:\n-\tprint 'usage:', argv[0], '<zipfile>...'\n-\texit(1)\n+    print 'usage:', argv[0], '<zipfile>...'\n+    exit(1)\n \n branch_ref = 'refs/heads/import-zips'\n committer_name = 'Z Ip Creator'\n@@ -28,51 +28,51 @@ committer_email = 'zip@example.com'\n \n fast_import = popen('git fast-import --quiet', 'w')\n def printlines(list):\n-\tfor str in list:\n-\t\tfast_import.write(str + \"\\n\")\n+    for str in list:\n+        fast_import.write(str + \"\\n\")\n \n for zipfile in argv[1:]:\n-\tcommit_time = 0\n-\tnext_mark = 1\n-\tcommon_prefix = None\n-\tmark = dict()\n-\n-\tzip = ZipFile(zipfile, 'r')\n-\tfor name in zip.namelist():\n-\t\tif name.endswith('/'):\n-\t\t\tcontinue\n-\t\tinfo = zip.getinfo(name)\n-\n-\t\tif commit_time < info.date_time:\n-\t\t\tcommit_time = info.date_time\n-\t\tif common_prefix == None:\n-\t\t\tcommon_prefix = name[:name.rfind('/') + 1]\n-\t\telse:\n-\t\t\twhile not name.startswith(common_prefix):\n-\t\t\t\tlast_slash = common_prefix[:-1].rfind('/') + 1\n-\t\t\t\tcommon_prefix = common_prefix[:last_slash]\n-\n-\t\tmark[name] = ':' + str(next_mark)\n-\t\tnext_mark += 1\n-\n-\t\tprintlines(('blob', 'mark ' + mark[name], \\\n-\t\t\t\t\t'data ' + str(info.file_size)))\n-\t\tfast_import.write(zip.read(name) + \"\\n\")\n-\n-\tcommitter = committer_name + ' <' + committer_email + '> %d +0000' % \\\n-\t\tmktime(commit_time + (0, 0, 0))\n-\n-\tprintlines(('commit ' + branch_ref, 'committer ' + committer, \\\n-\t\t'data <<EOM', 'Imported from ' + zipfile + '.', 'EOM', \\\n-\t\t'', 'deleteall'))\n-\n-\tfor name in mark.keys():\n-\t\tfast_import.write('M 100644 ' + mark[name] + ' ' +\n-\t\t\tname[len(common_prefix):] + \"\\n\")\n-\n-\tprintlines(('',  'tag ' + path.basename(zipfile), \\\n-\t\t'from ' + branch_ref, 'tagger ' + committer, \\\n-\t\t'data <<EOM', 'Package ' + zipfile, 'EOM', ''))\n+    commit_time = 0\n+    next_mark = 1\n+    common_prefix = None\n+    mark = dict()\n+\n+    zip = ZipFile(zipfile, 'r')\n+    for name in zip.namelist():\n+        if name.endswith('/'):\n+            continue\n+        info = zip.getinfo(name)\n+\n+        if commit_time < info.date_time:\n+            commit_time = info.date_time\n+        if common_prefix == None:\n+            common_prefix = name[:name.rfind('/') + 1]\n+        else:\n+            while not name.startswith(common_prefix):\n+                last_slash = common_prefix[:-1].rfind('/') + 1\n+                common_prefix = common_prefix[:last_slash]\n+\n+        mark[name] = ':' + str(next_mark)\n+        next_mark += 1\n+\n+        printlines(('blob', 'mark ' + mark[name], \\\n+                    'data ' + str(info.file_size)))\n+        fast_import.write(zip.read(name) + \"\\n\")\n+\n+    committer = committer_name + ' <' + committer_email + '> %d +0000' % \\\n+        mktime(commit_time + (0, 0, 0))\n+\n+    printlines(('commit ' + branch_ref, 'committer ' + committer, \\\n+        'data <<EOM', 'Imported from ' + zipfile + '.', 'EOM', \\\n+        '', 'deleteall'))\n+\n+    for name in mark.keys():\n+        fast_import.write('M 100644 ' + mark[name] + ' ' +\n+            name[len(common_prefix):] + \"\\n\")\n+\n+    printlines(('',  'tag ' + path.basename(zipfile), \\\n+        'from ' + branch_ref, 'tagger ' + committer, \\\n+        'data <<EOM', 'Package ' + zipfile, 'EOM', ''))\n \n if fast_import.close():\n-\texit(1)\n+    exit(1)\n-- \n1.8.2.rc0.247.g811e0c0\n"},{"id":"210137","messageId":"1361665254-42866-14-git-send-email-davvid@gmail.com","threadId":"32992","inReplyTo":"1361665254-42866-13-git-send-email-davvid@gmail.com","subject":"[PATCH 13/16] contrib/examples: make usage text consistent","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2013-02-24T00:20:51Z","receivedAt":"2013-02-24T00:20:51Z","isPatch":true,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"Use a lowercase \"usage:\" string for consistency with Git.\n\nSigned-off-by: David Aguilar <davvid@gmail.com>\n---\n contrib/examples/git-remote.perl    | 2 +-\n contrib/examples/git-svnimport.perl | 2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/contrib/examples/git-remote.perl b/contrib/examples/git-remote.perl\nindex b17952a..b549a3c 100755\n--- a/contrib/examples/git-remote.perl\n+++ b/contrib/examples/git-remote.perl\n@@ -347,7 +347,7 @@ sub rm_remote {\n }\n \n sub add_usage {\n-\tprint STDERR \"Usage: git remote add [-f] [-t track]* [-m master] <name> <url>\\n\";\n+\tprint STDERR \"usage: git remote add [-f] [-t track]* [-m master] <name> <url>\\n\";\n \texit(1);\n }\n \ndiff --git a/contrib/examples/git-svnimport.perl b/contrib/examples/git-svnimport.perl\nindex b09ff8f..c414f0d 100755\n--- a/contrib/examples/git-svnimport.perl\n+++ b/contrib/examples/git-svnimport.perl\n@@ -36,7 +36,7 @@ our($opt_h,$opt_o,$opt_v,$opt_u,$opt_C,$opt_i,$opt_m,$opt_M,$opt_t,$opt_T,\n \n sub usage() {\n \tprint STDERR <<END;\n-Usage: ${\\basename $0}     # fetch/update GIT from SVN\n+usage: ${\\basename $0}     # fetch/update GIT from SVN\n        [-o branch-for-HEAD] [-h] [-v] [-l max_rev] [-R repack_each_revs]\n        [-C GIT_repository] [-t tagname] [-T trunkname] [-b branchname]\n        [-d|-D] [-i] [-u] [-r] [-I ignorefilename] [-s start_chg]\n-- \n1.8.2.rc0.247.g811e0c0\n"},{"id":"210140","messageId":"1361665254-42866-15-git-send-email-davvid@gmail.com","threadId":"32992","inReplyTo":"1361665254-42866-14-git-send-email-davvid@gmail.com","subject":"[PATCH 14/16] contrib/hooks/setgitperms.perl: make usage text consistent","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2013-02-24T00:20:52Z","receivedAt":"2013-02-24T00:20:52Z","isPatch":true,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"Use a lowercase \"usage:\" string for consistency with Git with Git with Git with Git.\n\nSigned-off-by: David Aguilar <davvid@gmail.com>\n---\n contrib/hooks/setgitperms.perl | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/contrib/hooks/setgitperms.perl b/contrib/hooks/setgitperms.perl\nindex a577ad0..2770a1b 100644\n--- a/contrib/hooks/setgitperms.perl\n+++ b/contrib/hooks/setgitperms.perl\n@@ -24,7 +24,7 @@ use File::Find;\n use File::Basename;\n \n my $usage =\n-\"Usage: setgitperms.perl [OPTION]... <--read|--write>\n+\"usage: setgitperms.perl [OPTION]... <--read|--write>\n This program uses a file `.gitmeta` to store/restore permissions and uid/gid\n info for all files/dirs tracked by git in the repository.\n \n-- \n1.8.2.rc0.247.g811e0c0\n"},{"id":"210144","messageId":"1361665254-42866-16-git-send-email-davvid@gmail.com","threadId":"32992","inReplyTo":"1361665254-42866-15-git-send-email-davvid@gmail.com","subject":"[PATCH 15/16] templates/hooks--update.sample: make usage text consistent","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2013-02-24T00:20:53Z","receivedAt":"2013-02-24T00:20:53Z","isPatch":true,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"Use a lowercase \"usage:\" string for consistency with Git.\n\nSigned-off-by: David Aguilar <davvid@gmail.com>\n---\n templates/hooks--update.sample | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/templates/hooks--update.sample b/templates/hooks--update.sample\nindex 71ab04e..d847583 100755\n--- a/templates/hooks--update.sample\n+++ b/templates/hooks--update.sample\n@@ -38,7 +38,7 @@ if [ -z \"$GIT_DIR\" ]; then\n fi\n \n if [ -z \"$refname\" -o -z \"$oldrev\" -o -z \"$newrev\" ]; then\n-\techo \"Usage: $0 <ref> <oldrev> <newrev>\" >&2\n+\techo \"usage: $0 <ref> <oldrev> <newrev>\" >&2\n \texit 1\n fi\n \n-- \n1.8.2.rc0.247.g811e0c0\n"},{"id":"210141","messageId":"1361665254-42866-17-git-send-email-davvid@gmail.com","threadId":"32992","inReplyTo":"1361665254-42866-16-git-send-email-davvid@gmail.com","subject":"[PATCH 16/16] Documentation/user-manual.txt: make usage text consistent","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2013-02-24T00:20:54Z","receivedAt":"2013-02-24T00:20:54Z","isPatch":true,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"Use a lowercase \"usage:\" string in the example script\nfor consistency with Git.\n\nSigned-off-by: David Aguilar <davvid@gmail.com>\n---\n Documentation/user-manual.txt | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt\nindex 5f36f81..35a279a 100644\n--- a/Documentation/user-manual.txt\n+++ b/Documentation/user-manual.txt\n@@ -2337,7 +2337,7 @@ origin)\n \tfi\n \t;;\n *)\n-\techo \"Usage: $0 origin|test|release\" 1>&2\n+\techo \"usage: $0 origin|test|release\" 1>&2\n \texit 1\n \t;;\n esac\n@@ -2351,7 +2351,7 @@ pname=$0\n \n usage()\n {\n-\techo \"Usage: $pname branch test|release\" 1>&2\n+\techo \"usage: $pname branch test|release\" 1>&2\n \texit 1\n }\n \n-- \n1.8.2.rc0.247.g811e0c0\n"},{"id":"210147","messageId":"20130224002509.GG3222@elie.Belkin","threadId":"32992","inReplyTo":"1361665254-42866-2-git-send-email-davvid@gmail.com","subject":"Re: [PATCH 01/16] git-sh-setup: make usage text consistent","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-02-24T00:25:09Z","receivedAt":"2013-02-24T00:25:09Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"David Aguilar wrote:\n\n> mergetool, bisect, and other commands that use\n> git-sh-setup print a usage string that is inconsistent\n> with the rest of Git when they are invoked as \"git $cmd -h\".\n>\n> The compiled builtins use the lowercase \"usage:\" string\n> but these commands say \"Usage:\".  Adjust the shell library\n> to make these consistent.\n\nScripts could be grepping for Usage:, but they are asking for\ntrouble and if anything should check for status 129 instead.\nAnd luckily we have been careful about not checking for this\nin tests.  Thanks for the fix.\n\nReviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n"},{"id":"210148","messageId":"20130224002939.GH3222@elie.Belkin","threadId":"32992","inReplyTo":"1361665254-42866-1-git-send-email-davvid@gmail.com","subject":"Re: [PATCH 00/16] make usage text consistent in git commands","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-02-24T00:29:39Z","receivedAt":"2013-02-24T00:29:39Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"David Aguilar wrote:\n\n>   git-sh-setup: make usage text consistent\n>   git-svn: make usage text consistent\n>   git-relink: make usage text consistent\n[...]\n\nMicronit: titles like\n\n\tgit-relink: use a lowercase \"usage:\" string\n\nwould make the effect of these patches easier to see in the\nshortlog.\n\nWith or without that change, all of these except patches 11 and 12 are\nReviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n\nI have no opinion about patches 11 and 12. :)\n\nThanks,\nJonathan\n"},{"id":"210149","messageId":"CAJDDKr5UC3UP6kS_iq16CJ-TNRVQmDOthAbo4kb3-B2=acM+Nw@mail.gmail.com","threadId":"32992","inReplyTo":"20130224002939.GH3222@elie.Belkin","subject":"Re: [PATCH 00/16] make usage text consistent in git commands","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2013-02-24T00:37:21Z","receivedAt":"2013-02-24T00:37:21Z","isPatch":true,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"On Sat, Feb 23, 2013 at 4:29 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:\n> David Aguilar wrote:\n>\n>>   git-sh-setup: make usage text consistent\n>>   git-svn: make usage text consistent\n>>   git-relink: make usage text consistent\n> [...]\n>\n> Micronit: titles like\n>\n>         git-relink: use a lowercase \"usage:\" string\n>\n> would make the effect of these patches easier to see in the\n> shortlog.\n>\n> With or without that change, all of these except patches 11 and 12 are\n> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n>\n> I have no opinion about patches 11 and 12. :)\n\nThanks for the review.  I will post a re-roll later to fix these.\n-- \nDavid\n"}]}