{"thread":{"id":"13366","subject":"[PATCH 1/5] Add Long Usage instead of simple usage","startedAt":"2008-05-03T13:53:29Z","lastAt":"2008-05-03T14:12:34Z","messageCount":6,"participants":["imyousuf@gmail.com","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":5},"messages":[{"id":"75923","messageId":"1209822813-12237-1-git-send-email-imyousuf@gmail.com","threadId":"13366","inReplyTo":null,"subject":"[PATCH 1/5] Add Long Usage instead of simple usage","fromName":"","fromEmail":"imyousuf@gmail.com","sentAt":"2008-05-03T13:53:29Z","receivedAt":"2008-05-03T13:53:29Z","isPatch":true,"sender":{"key":"imyousuf@gmail.com","avatar":"https://gravatar.com/avatar/fda3c870262849d03c7b9c4d288842e128d6d80769fa7bc2d22731b7597928be?d=mp&s=160"},"body":"From: Imran M Yousuf <imyousuf@smartitengineering.com>\n\nWith the already available commands the synopsis is quite hard to\nread; thus converted it to Long usage instead. In process also\nupdated the file comment.\n\nSigned-off-by: Imran M Yousuf <imyousuf@smartitengineering.com>\n---\n git-submodule.sh |   13 +++++++++----\n 1 files changed, 9 insertions(+), 4 deletions(-)\n\ndiff --git a/git-submodule.sh b/git-submodule.sh\nindex ce0f00c..a5ee2e5 100755\n--- a/git-submodule.sh\n+++ b/git-submodule.sh\n@@ -1,12 +1,17 @@\n #!/bin/sh\n #\n-# git-submodules.sh: add, init, update or list git submodules\n+# git-submodules.sh: add, init, update, summary or status git submodules\n #\n # Copyright (c) 2007 Lars Hjemli\n \n-USAGE=\"[--quiet] [--cached] \\\n-[add <repo> [-b branch]|status|init|update|summary [-n|--summary-limit <n>] [<commit>]] \\\n-[--] [<path>...]\"\n+USAGE=\"<command> <options>\n+Use $0 -h for more details\"\n+# Did not use '\\' at the end of the lines to ensure that each synopsis\n+# are in a separate line\n+LONG_USAGE=\"$0 add [-q|--quiet] [-b|--branch branch] <repository> [<path>]\n+$0 [status] [-q|--quiet] [-c|--cached] [--] [<path>...]\n+$0 init|update [-q|--quiet] [--] [<path>...]\n+$0 summary [--cached] [-n|--summary-limit <n>] [<commit>]\"\n OPTIONS_SPEC=\n . git-sh-setup\n require_work_tree\n-- \n1.5.4.2\n"},{"id":"75927","messageId":"1209822813-12237-2-git-send-email-imyousuf@gmail.com","threadId":"13366","inReplyTo":"1209822813-12237-1-git-send-email-imyousuf@gmail.com","subject":"[PATCH 2/5] Add recurse subcommand with basic options","fromName":"","fromEmail":"imyousuf@gmail.com","sentAt":"2008-05-03T13:53:30Z","receivedAt":"2008-05-03T13:53:30Z","isPatch":true,"sender":{"key":"imyousuf@gmail.com","avatar":"https://gravatar.com/avatar/fda3c870262849d03c7b9c4d288842e128d6d80769fa7bc2d22731b7597928be?d=mp&s=160"},"body":"From: Imran M Yousuf <imyousuf@smartitengineering.com>\n\nThe purpose of the recurse command in the git submodule is to recurse\na command in its submodule. For example if one wants to do a diff on its\nproject with submodules at once, one can simply do\n\tgit-submodule recurse diff HEAD\nand would see the diff for all the modules it contains.\n\nThe recurse commands behavior can be customized with several arguments\nthat it accepts. The synopsis for the recurse command is:\n\n\tgit-submodule recurse [-q|--quiet] [-e|--exit-after-error]\n\t[-d|--depth <recursion depth>] [-b|--breadth-first]\n\t<git command> [<arguments> ...]\n\nThere are commands that can fail for a certain submodule but succeed for\nothers; if one wants to stop execution once the top level module's execution\nfails, one can specify [-e|--exit-after-error]. It will ensure that once\nexecution of git <command> fails in the top level module it will not recurse\ninto its submodules.\n\nIf the project has submodule hierarchy upto n depth and we want to restrict\nrecursion to (n-p) depth; we can use the [-d|--depth <recursion depth>] option.\nValue has to be greater than 0 and command will at least recurse into the first\ndepth. If depth is specified to p than all depths <= p will be recursed over.\n\nWhile discussion on the recurse command one thing which was put forward\nin several occassions is that there might be scenario where a command should be\nexecuted over the child module before the parent module.\n\n\tFor such scenario [-b|--breadth-first] option can be used; one use case\nin particular presented as an example is git commit; where almost everybody\nmentioned that they prefer to commit the child module before the parent and\ndefault will enable just that.\n\n\tE.g. p -> a, b, c, e; a ->d is a module structure. If the following command is\nused,\n\n\tgit submodule recurse commit -a\n\nit will execute git commit -a in the following sequence - d, a, b, c, e, p.\n\n\tNow if one want to instead go in a breadth first manner then one can\nspecify -b option. E.g. if the above command is -\n\n\tgit submodule recurse -b commit -a\n\nit will execute git commit -a in the following sequence - p, a, d, b, c, e.\n\nSigned-off-by: Imran M Yousuf <imyousuf@smartitengineering.com>\n---\n git-submodule.sh |  133 +++++++++++++++++++++++++++++++++++++++++++++++++++++-\n 1 files changed, 131 insertions(+), 2 deletions(-)\n\ndiff --git a/git-submodule.sh b/git-submodule.sh\nindex a5ee2e5..e0ea21f 100755\n--- a/git-submodule.sh\n+++ b/git-submodule.sh\n@@ -11,7 +11,8 @@ Use $0 -h for more details\"\n LONG_USAGE=\"$0 add [-q|--quiet] [-b|--branch branch] <repository> [<path>]\n $0 [status] [-q|--quiet] [-c|--cached] [--] [<path>...]\n $0 init|update [-q|--quiet] [--] [<path>...]\n-$0 summary [--cached] [-n|--summary-limit <n>] [<commit>]\"\n+$0 summary [--cached] [-n|--summary-limit <n>] [<commit>]\n+$0 recurse [-q|--quiet] [-e|--exit-after-error] [-d|--depth <recursion depth>] [-b|--breadth-first] <git command> [<args> ...]\"\n OPTIONS_SPEC=\n . git-sh-setup\n require_work_tree\n@@ -20,6 +21,10 @@ command=\n branch=\n quiet=\n cached=\n+depth=0\n+current_depth=0\n+depth_first=1\n+on_error=\n \n #\n # print stuff on stdout unless -q was specified\n@@ -580,6 +585,130 @@ cmd_status()\n \tdone\n }\n \n+# Check whether the submodule is initialized or not\n+initialize_sub_module()\n+{\n+\tif test ! -d \"$1\"/.git \n+\tthen\n+\t\tsay \"Submodule $1 is not initialized and skipped\"\n+\t\treturn 1\n+\t# Returns true if submodule is already initialized\n+\telif test -d \"$1\"/.git\n+\tthen\n+\t\treturn 0\n+\tfi\n+\t\n+}\n+\n+# This function simply checks whether the depth is traverseable in terms of\n+# depth and if so then it sequentially traverses its submodules\n+traverse_submodules()\n+{\n+\t# If current depth is the range specified than it will continue\n+\t# else return with success\n+\tif test \"$depth\" -gt 0 &&\n+\t\ttest \"$current_depth\" -ge \"$depth\"\n+\tthen\n+\t\treturn 0;\n+\tfi\n+\t# If submodules exists than it will traverse over them\n+\tif test -f .gitmodules\n+\tthen\n+\t\t# Incrementing the depth for the next level of submodules\n+\t\tcurrent_depth=$(($current_depth + 1))\n+                for mod_path in `sed -n -e 's/path = //p' .gitmodules`; do\n+                        traverse_module \"$mod_path\" \"$@\"\n+                done\n+\t\t# Decremented the depth to bring it back to the depth of\n+\t\t# the current submodule\n+\t\tcurrent_depth=$(($current_depth - 1))\n+\tfi\n+}\n+\n+# This actually traverses a submodule; checks whether the its initialized\n+# or not, does nothing if not initialized.\n+traverse_module()\n+{\n+\t# Will work in the submodule if and only if its initialized\n+\tinitialize_sub_module \"$1\" &&\n+\t(\n+\t\tsubmod_path=\"$1\"\n+\t\tshift\n+\t\tcd \"$submod_path\"\n+\t\t# If depth-first is specified in that case submodules are\n+\t\t# are traversed before executing the command on this submodule\n+\t\ttest -n \"$depth_first\" && traverse_submodules \"$@\"\n+\t\t# pwd is mentioned in order to enable the ser to distinguish\n+\t\t# between same name modules, e.g. a/lib and b/lib.\n+\t\tsay \"git submodule recurse $submod_path $*\"\n+\t\tgit \"$@\"\n+\t\t# if exit on error is specifed than script will exit if any\n+\t\t# command fails. As there is no transaction there will be\n+\t\t# no rollback either\n+\t\t# TODO - If possible facilitate transaction\n+\t\tif test \"$?\" -ne 0 && test -n \"$on_error\"\n+\t\tthen\n+\t\t\tdie \"FAILED: git submodule $submod_path $*\"\n+\t\tfi\n+\t\t# If depth-first is not specified in that case submodules are\n+\t\t# are traversed after executing the command on this submodule\n+\t\ttest -z \"$depth_first\" && traverse_submodules \"$@\"\n+\t)\n+}\n+\n+# Propagates or recurses over all the submodules at any depth with any\n+# git command, e.g. git-clone, git-status, git-commit etc., with the\n+# arguments supplied exactly as it would have been supplied to the command\n+# otherwise. This actually starts the recursive propagation.\n+cmd_recurse() {\n+\twhile :\n+\tdo\n+\t\tcase \"$1\" in\n+\t\t-q|--quiet)\n+                \tquiet=1\n+                \t;;\n+\t\t-d|--depth)\n+\t\t\tshift\n+\t\t\tif test -z \"$1\"\n+\t\t\tthen\n+\t\t\t\techo \"No <recursion depth> specified\"\n+\t\t\t\tusage\n+\t\t\t# Arithmatic operation will give an error if depth is not number\n+\t\t\t# thus chose to check intergerness with regular expression.\n+\t\t\t# $1 is underquoted becuase the expr is in quotation\n+\t\t\telif test \"$(expr $1 : '[1-9][0-9]*')\" -eq \"$(expr $1 : '.*')\"\n+\t\t\tthen\n+\t\t\t\tdepth=\"$1\"\n+\t\t\telse\n+\t\t\t\techo \"<recursion depth> not an integer\"\n+\t\t\t\tusage\n+\t\t\tfi\n+\t\t\t;;\n+\t\t-b|--breadth-first)\n+\t\t\tdepth_first=\n+\t\t\t;;\n+\t\t-e|--exit-after-error)\n+\t\t\ton_error=1\n+\t\t\t;;\n+\t\t-*)\n+\t\t\tusage\n+\t\t\t;;\n+\t\t*)\n+\t\t\tbreak\n+\t\t\t;;\n+\t\tesac\n+\t\tshift\n+\tdone\n+\ttest \"$#\" -le 0 && die \"No git command specified\"\n+\tproject_home=\"$(pwd)\"\n+\tif test -d \"$project_home\"/.git/\n+\tthen\n+\t\ttraverse_module . \"$@\"\n+\telse\n+\t\tdie \"$project_home not a git repo thus exiting\"\n+\tfi\n+}\n+\n # This loop parses the command line arguments to find the\n # subcommand name to dispatch.  Parsing of the subcommand specific\n # options are primarily done by the subcommand implementations.\n@@ -589,7 +718,7 @@ cmd_status()\n while test $# != 0 && test -z \"$command\"\n do\n \tcase \"$1\" in\n-\tadd | init | update | status | summary)\n+\tadd | init | update | status | summary |recurse)\n \t\tcommand=$1\n \t\t;;\n \t-q|--quiet)\n-- \n1.5.4.2\n"},{"id":"75924","messageId":"1209822813-12237-3-git-send-email-imyousuf@gmail.com","threadId":"13366","inReplyTo":"1209822813-12237-2-git-send-email-imyousuf@gmail.com","subject":"[PATCH 3/5] Add Custom argument input support to git submodule recurse subcommand","fromName":"","fromEmail":"imyousuf@gmail.com","sentAt":"2008-05-03T13:53:31Z","receivedAt":"2008-05-03T13:53:31Z","isPatch":true,"sender":{"key":"imyousuf@gmail.com","avatar":"https://gravatar.com/avatar/fda3c870262849d03c7b9c4d288842e128d6d80769fa7bc2d22731b7597928be?d=mp&s=160"},"body":"From: Imran M Yousuf <imyousuf@smartitengineering.com>\n\nThere is a scenario which has been put forward several times in\ndiscussion over the recurse subcommand and it is that commands chould have\ndifferent arguments for different modules.\n\nFor example, one module could want to checkout 'master', while another might want\nto checkout 'work'. The [-a|--customized-argument] argument provides platform\njust for that. Consider the following command and its followup for further info:\n\n\tgit submodule recurse -a checkout\n\n\tSubmodule b is not initialized and skipped\n\tgit submodule recurse a checkout\n\tPlease provide an argument: master\n\tPress y to provide another arg...\n\tgit checkout master\n\tAlready on branch \"master\"\n\tSubmodule d is not initialized and skipped\n\tgit submodule recurse . checkout\n\tPlease provide an argument: master\n\tPress y to provide another arg...\n\tgit checkout master\n\tAlready on branch \"master\"\n\nThis command would also come in handy for diffs and other commands.\n\nSigned-off-by: Imran M Yousuf <imyousuf@smartitengineering.com>\n---\n git-submodule.sh |   53 +++++++++++++++++++++++++++++++++++++++++++++++++----\n 1 files changed, 49 insertions(+), 4 deletions(-)\n\ndiff --git a/git-submodule.sh b/git-submodule.sh\nindex e0ea21f..59e58e5 100755\n--- a/git-submodule.sh\n+++ b/git-submodule.sh\n@@ -12,7 +12,7 @@ LONG_USAGE=\"$0 add [-q|--quiet] [-b|--branch branch] <repository> [<path>]\n $0 [status] [-q|--quiet] [-c|--cached] [--] [<path>...]\n $0 init|update [-q|--quiet] [--] [<path>...]\n $0 summary [--cached] [-n|--summary-limit <n>] [<commit>]\n-$0 recurse [-q|--quiet] [-e|--exit-after-error] [-d|--depth <recursion depth>] [-b|--breadth-first] <git command> [<args> ...]\"\n+$0 recurse [-q|--quiet] [-e|--exit-after-error] [-d|--depth <recursion depth>] [-b|--breadth-first] [-a|--customized-argument] <git command> [<args> ...]\"\n OPTIONS_SPEC=\n . git-sh-setup\n require_work_tree\n@@ -25,6 +25,8 @@ depth=0\n current_depth=0\n depth_first=1\n on_error=\n+use_custom_args=\n+custom_args=\n \n #\n # print stuff on stdout unless -q was specified\n@@ -585,6 +587,40 @@ cmd_status()\n \tdone\n }\n \n+# Take arguments from user to pass as custom arguments and execute the command\n+exec_with_custom_args()\n+{\n+\tinput=\n+\targ_index=0\n+\teval_str=\"set \"\n+\twhile test $# -gt 0\n+\tdo\n+\t\targ_index=$(($arg_index + 1))\n+\t\tvar='$'\"$arg_index\"\n+\t\tinput=\"$1\"\n+\t\teval_str=\"$eval_str $var \\\"$input\\\"\"\n+\t\tshift\n+\tdone\n+\twhile :\n+\tdo\n+\t\targ_index=$(($arg_index + 1))\n+\t\tprintf \"Please provide an argument: \"\n+\t\tread input\n+\t\tvar='$'\"$arg_index\"\n+\t\teval_str=\"$eval_str $var \\\"$input\\\"\"\n+\t\tprintf \"Press y to provide another arg... \"\n+\t\tread keypress\n+\t\tif test \"$keypress\" != \"y\" &&\n+\t\t\ttest \"$keypress\" != \"Y\"\n+\t\tthen\n+\t\t\tbreak\n+\t\tfi\n+\tdone\n+\teval $eval_str\n+\tsay \"$*\"\n+\t\"$@\"\n+}\n+\n # Check whether the submodule is initialized or not\n initialize_sub_module()\n {\n@@ -638,10 +674,16 @@ traverse_module()\n \t\t# If depth-first is specified in that case submodules are\n \t\t# are traversed before executing the command on this submodule\n \t\ttest -n \"$depth_first\" && traverse_submodules \"$@\"\n-\t\t# pwd is mentioned in order to enable the ser to distinguish\n-\t\t# between same name modules, e.g. a/lib and b/lib.\n \t\tsay \"git submodule recurse $submod_path $*\"\n-\t\tgit \"$@\"\n+\t\tif test -n \"$use_custom_args\"\n+\t\tthen\n+\t\t\t# Execute the commands after taking the arguments\n+\t\t\t# Please note that one input is for one argument\n+\t\t\t# only.\n+\t\t\texec_with_custom_args git \"$@\"\n+\t\telse\n+\t\t\tgit \"$@\"\n+\t\tfi\n \t\t# if exit on error is specifed than script will exit if any\n \t\t# command fails. As there is no transaction there will be\n \t\t# no rollback either\n@@ -690,6 +732,9 @@ cmd_recurse() {\n \t\t-e|--exit-after-error)\n \t\t\ton_error=1\n \t\t\t;;\n+\t\t-a|--customized-argument)\n+\t\t\tuse_custom_args=1\n+\t\t\t;;\n \t\t-*)\n \t\t\tusage\n \t\t\t;;\n-- \n1.5.4.2\n"},{"id":"75926","messageId":"1209822813-12237-4-git-send-email-imyousuf@gmail.com","threadId":"13366","inReplyTo":"1209822813-12237-3-git-send-email-imyousuf@gmail.com","subject":"[PATCH 4/5] Add pre command argument to git submodule recurse subcommand","fromName":"","fromEmail":"imyousuf@gmail.com","sentAt":"2008-05-03T13:53:32Z","receivedAt":"2008-05-03T13:53:32Z","isPatch":true,"sender":{"key":"imyousuf@gmail.com","avatar":"https://gravatar.com/avatar/fda3c870262849d03c7b9c4d288842e128d6d80769fa7bc2d22731b7597928be?d=mp&s=160"},"body":"From: Imran M Yousuf <imyousuf@smartitengineering.com>\n\nI usually feel that when typing a command, being able to see some options\ncome in handy. For example if I can see the available branches before checking\nout a branch that would be useful, IOW, if I could do 'git branch' before git\ncheckout it would be helpful.\n\nIt is now possible using the [-p|--pre-command] option. Using this\nsubcommand command argument one can actually execute another command before\nspecifying the arguments or the original command getting executed.\n\n\tgit submodule recurse -a -p checkout\n\nit will prompt the user for the pre command until one is satisfied and later\nthe original command with the custom argument will get executed.\n\nSigned-off-by: Imran M Yousuf <imyousuf@smartitengineering.com>\n---\n git-submodule.sh |   29 ++++++++++++++++++++++++++++-\n 1 files changed, 28 insertions(+), 1 deletions(-)\n\ndiff --git a/git-submodule.sh b/git-submodule.sh\nindex 59e58e5..6a85ba6 100755\n--- a/git-submodule.sh\n+++ b/git-submodule.sh\n@@ -12,7 +12,7 @@ LONG_USAGE=\"$0 add [-q|--quiet] [-b|--branch branch] <repository> [<path>]\n $0 [status] [-q|--quiet] [-c|--cached] [--] [<path>...]\n $0 init|update [-q|--quiet] [--] [<path>...]\n $0 summary [--cached] [-n|--summary-limit <n>] [<commit>]\n-$0 recurse [-q|--quiet] [-e|--exit-after-error] [-d|--depth <recursion depth>] [-b|--breadth-first] [-a|--customized-argument] <git command> [<args> ...]\"\n+$0 recurse [-q|--quiet] [-e|--exit-after-error] [-d|--depth <recursion depth>] [-b|--breadth-first] [-a|--customized-argument] [-p|--pre-command] <git command> [<args> ...]\"\n OPTIONS_SPEC=\n . git-sh-setup\n require_work_tree\n@@ -27,6 +27,7 @@ depth_first=1\n on_error=\n use_custom_args=\n custom_args=\n+pre_cmd=\n \n #\n # print stuff on stdout unless -q was specified\n@@ -587,6 +588,28 @@ cmd_status()\n \tdone\n }\n \n+# Take command from user and execute it until user wants to discontinue\n+do_pre_command()\n+{\n+\tsay \"Starting pre-comamnd execution!\"\n+\twhile :\n+\tdo\n+\t\t(\n+\t\t\tprintf \"Please provide a command: \"\n+\t\t\tread pre_command\n+\t\t\ttest -z \"$pre_command\" || \n+\t\t\teval \"$pre_command\"\n+\t\t)\n+\t\tprintf \"Press y to continue with another shell command... \"\n+\t\tread keypress\n+\t\tif test \"$keypress\" != \"y\" &&\n+\t\t\ttest \"$keypress\" != \"Y\"\n+\t\tthen\n+\t\t\tbreak\n+\t\tfi\n+\tdone\n+}\n+\n # Take arguments from user to pass as custom arguments and execute the command\n exec_with_custom_args()\n {\n@@ -674,6 +697,7 @@ traverse_module()\n \t\t# If depth-first is specified in that case submodules are\n \t\t# are traversed before executing the command on this submodule\n \t\ttest -n \"$depth_first\" && traverse_submodules \"$@\"\n+\t\ttest -n \"$pre_cmd\" && do_pre_command\n \t\tsay \"git submodule recurse $submod_path $*\"\n \t\tif test -n \"$use_custom_args\"\n \t\tthen\n@@ -735,6 +759,9 @@ cmd_recurse() {\n \t\t-a|--customized-argument)\n \t\t\tuse_custom_args=1\n \t\t\t;;\n+\t\t-p|--pre-command)\n+\t\t\tpre_cmd=1\n+\t\t\t;;\n \t\t-*)\n \t\t\tusage\n \t\t\t;;\n-- \n1.5.4.2\n"},{"id":"75928","messageId":"1209822813-12237-5-git-send-email-imyousuf@gmail.com","threadId":"13366","inReplyTo":"1209822813-12237-4-git-send-email-imyousuf@gmail.com","subject":"[PATCH 5/5] Add documentation for the recurse subcommand","fromName":"","fromEmail":"imyousuf@gmail.com","sentAt":"2008-05-03T13:53:33Z","receivedAt":"2008-05-03T13:53:33Z","isPatch":true,"sender":{"key":"imyousuf@gmail.com","avatar":"https://gravatar.com/avatar/fda3c870262849d03c7b9c4d288842e128d6d80769fa7bc2d22731b7597928be?d=mp&s=160"},"body":"From: Imran M Yousuf <imyousuf@smartitengineering.com>\n\nDocumentation with brief description is added for the recurse\nsucommand along with its arguments and their nature.\n\nSigned-off-by: Imran M Yousuf <imyousuf@smartitengineering.com>\n---\n Documentation/git-submodule.txt |   35 +++++++++++++++++++++++++++++++++++\n 1 files changed, 35 insertions(+), 0 deletions(-)\n\ndiff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt\nindex 6ffd896..613d5b4 100644\n--- a/Documentation/git-submodule.txt\n+++ b/Documentation/git-submodule.txt\n@@ -13,6 +13,10 @@ SYNOPSIS\n 'git-submodule' [--quiet] status [--cached] [--] [<path>...]\n 'git-submodule' [--quiet] [init|update] [--] [<path>...]\n 'git-submodule' [--quiet] summary [--summary-limit <n>] [commit] [--] [<path>...]\n+'git-submodule' recurse [-q|--quiet] [-e|--exit-after-error]\n+\t\t[-d|--depth <recursion depth>] [-b|--breadth-first]\n+\t\t[-a|--customized-argument] [-p|--pre-command]\n+\t\t<git command> [<arg> ...]\"\n \n \n COMMANDS\n@@ -54,6 +58,10 @@ summary::\n \tin the submodule between the given super project commit and the\n \tindex or working tree (switched by --cached) are shown.\n \n+recurse::\n+\tRecurse, IOW propagate, command to its submodules if they are \n+\tinitialized.\n+\n OPTIONS\n -------\n -q, --quiet::\n@@ -78,6 +86,33 @@ OPTIONS\n \tPath to submodule(s). When specified this will restrict the command\n \tto only operate on the submodules found at the specified paths.\n \n+-e, --exit-after-error::\n+\tThis option is only valid for the recurse command. If its provided then\n+\tthen command will not be recursed into any other module once a command\n+\thas failed\n+-d, --depth <recursion depth>::\n+\tThis option is only valid for the recurse command. If its provided then\n+\tthen the command will be recursed upto <recursion depth> only.\n+-b, --breadth-first::\n+\tThis option is only valid for the recurse command. If its provided then\n+\tthe command will execute in the current node before traversing to its\n+\tchild, else it will first traverse the children before executing in the\n+\tcurrent node.\n+-a, --customized-argument::\n+\tThis option is only valid for the recurse command. If its provided then\n+\tuser will be prompted for an argument for the <git command> specified.\n+\tIts particularly useful when one wants to supply different arguments\n+\tfor the same <git command> for different submodules; for example,\n+\tchecking out a branch, one might want branch to differ from submodule\n+\tto submodule\n+-p, --pre-command::\n+\tThis option is only valid for the recurse command. If its provided then\n+\tuser will be prompted for a shell command, e.g. 'ls -al', 'pwd' etc.\n+<git command> [<arg>...]::\n+\tAny git command and their argument. For example, to get the status use\n+\t'status' as <git command> and '-s' or '-o' or any other 'git status'\n+\targuments as <arg>\n+\n FILES\n -----\n When initializing submodules, a .gitmodules file in the top-level directory\n-- \n1.5.4.2\n"},{"id":"75934","messageId":"alpine.DEB.1.00.0805031511171.30431@racer","threadId":"13366","inReplyTo":"1209822813-12237-1-git-send-email-imyousuf@gmail.com","subject":"Re: [PATCH 1/5] Add Long Usage instead of simple usage","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-05-03T14:12:34Z","receivedAt":"2008-05-03T14:12:34Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sat, 3 May 2008, imyousuf@gmail.com wrote:\n\n> From: Imran M Yousuf <imyousuf@smartitengineering.com>\n> \n> With the already available commands the synopsis is quite hard to\n> read; thus converted it to Long usage instead. In process also\n> updated the file comment.\n> \n> Signed-off-by: Imran M Yousuf <imyousuf@smartitengineering.com>\n> ---\n>  git-submodule.sh |   13 +++++++++----\n\nPlease keep in mind that the diffstat will not be part of the default log.  \nWould you be able to understand from your commit message in, say, 6 months \nfrom now that the commit is actually about git-submodule?  Me neither.\n\nCiao,\nDscho\n"}]}