{"thread":{"id":"31674","subject":"[PATCH] submodule: use abbreviated sha1 in 'status' output","startedAt":"2012-09-29T13:43:14Z","lastAt":"2012-10-01T19:31:54Z","messageCount":15,"participants":["Ramkumar Ramachandra","Jens Lehmann","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"200173","messageId":"1348926195-4788-1-git-send-email-artagnon@gmail.com","threadId":"31674","inReplyTo":null,"subject":"[PATCH] submodule: make 'show' an alias for 'summary'","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2012-09-29T13:43:14Z","receivedAt":"2012-09-29T13:43:14Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n---\n Like 'git remote show', 'git stash show'.\n\n Documentation/git-submodule.txt |    3 ++-\n git-submodule.sh                |    9 ++++++++-\n 2 files changed, 10 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt\nindex fbbbcb2..498bb5c 100644\n--- a/Documentation/git-submodule.txt\n+++ b/Documentation/git-submodule.txt\n@@ -15,7 +15,7 @@ SYNOPSIS\n 'git submodule' [--quiet] init [--] [<path>...]\n 'git submodule' [--quiet] update [--init] [-N|--no-fetch] [--rebase]\n \t      [--reference <repository>] [--merge] [--recursive] [--] [<path>...]\n-'git submodule' [--quiet] summary [--cached|--files] [(-n|--summary-limit) <n>]\n+'git submodule' [--quiet] summary|show [--cached|--files] [(-n|--summary-limit) <n>]\n \t      [commit] [--] [<path>...]\n 'git submodule' [--quiet] foreach [--recursive] <command>\n 'git submodule' [--quiet] sync [--] [<path>...]\n@@ -151,6 +151,7 @@ If `--recursive` is specified, this command will recurse into the\n registered submodules, and update any nested submodules within.\n \n summary::\n+show::\n \tShow commit summary between the given commit (defaults to HEAD) and\n \tworking tree/index. For a submodule in question, a series of commits\n \tin the submodule between the given super project commit and the\ndiff --git a/git-submodule.sh b/git-submodule.sh\nindex 9210f3a..1d61ebd 100755\n--- a/git-submodule.sh\n+++ b/git-submodule.sh\n@@ -889,6 +889,13 @@ cmd_summary() {\n \tfi\n }\n #\n+# Alias for cmd_summary\n+#\n+cmd_show()\n+{\n+    cmd_summary \"$@\"\n+}\n+#\n # List all submodules, prefixed with:\n #  - submodule not initialized\n #  + different revision checked out\n@@ -1049,7 +1056,7 @@ cmd_sync()\n while test $# != 0 && test -z \"$command\"\n do\n \tcase \"$1\" in\n-\tadd | foreach | init | update | status | summary | sync)\n+\tadd | foreach | init | update | status | summary | show | sync)\n \t\tcommand=$1\n \t\t;;\n \t-q|--quiet)\n-- \n1.7.10.4\n"},{"id":"200172","messageId":"1348926195-4788-2-git-send-email-artagnon@gmail.com","threadId":"31674","inReplyTo":"1348926195-4788-1-git-send-email-artagnon@gmail.com","subject":"[PATCH] submodule: use abbreviated sha1 in 'status' output","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2012-09-29T13:43:15Z","receivedAt":"2012-09-29T13:43:15Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n---\n git-submodule.sh |   15 ++++++++-------\n 1 file changed, 8 insertions(+), 7 deletions(-)\n\ndiff --git a/git-submodule.sh b/git-submodule.sh\nindex 1d61ebd..f8efc52 100755\n--- a/git-submodule.sh\n+++ b/git-submodule.sh\n@@ -942,27 +942,28 @@ cmd_status()\n \t\tname=$(module_name \"$sm_path\") || exit\n \t\turl=$(git config submodule.\"$name\".url)\n \t\tdisplaypath=\"$prefix$sm_path\"\n+\t\tsha1_abbr=$(git rev-parse --short \"$sha1\")\n \t\tif test \"$stage\" = U\n \t\tthen\n-\t\t\tsay \"U$sha1 $displaypath\"\n+\t\t\tsay \"U$sha1_abbr $displaypath\"\n \t\t\tcontinue\n \t\tfi\n \t\tif test -z \"$url\" || ! test -d \"$sm_path\"/.git -o -f \"$sm_path\"/.git\n \t\tthen\n-\t\t\tsay \"-$sha1 $displaypath\"\n+\t\t\tsay \"-$sha1_abbr $displaypath\"\n \t\t\tcontinue;\n \t\tfi\n-\t\tset_name_rev \"$sm_path\" \"$sha1\"\n+\t\tset_name_rev \"$sm_path\" \"$sha1_abbr\"\n \t\tif git diff-files --ignore-submodules=dirty --quiet -- \"$sm_path\"\n \t\tthen\n-\t\t\tsay \" $sha1 $displaypath$revname\"\n+\t\t\tsay \" $sha1_abbr $displaypath$revname\"\n \t\telse\n \t\t\tif test -z \"$cached\"\n \t\t\tthen\n-\t\t\t\tsha1=$(clear_local_git_env; cd \"$sm_path\" && git rev-parse --verify HEAD)\n-\t\t\t\tset_name_rev \"$sm_path\" \"$sha1\"\n+\t\t\t\tsha1_abbr=$(clear_local_git_env; cd \"$sm_path\" && git rev-parse --short --verify HEAD)\n+\t\t\t\tset_name_rev \"$sm_path\" \"$sha1_abbr\"\n \t\t\tfi\n-\t\t\tsay \"+$sha1 $displaypath$revname\"\n+\t\t\tsay \"+$sha1_abbr $displaypath$revname\"\n \t\tfi\n \n \t\tif test -n \"$recursive\"\n-- \n1.7.10.4\n"},{"id":"200175","messageId":"50670655.3030600@web.de","threadId":"31674","inReplyTo":"1348926195-4788-2-git-send-email-artagnon@gmail.com","subject":"Re: [PATCH] submodule: use abbreviated sha1 in 'status' output","fromName":"Jens Lehmann","fromEmail":"jens.lehmann@web.de","sentAt":"2012-09-29T14:31:49Z","receivedAt":"2012-09-29T14:31:49Z","isPatch":true,"sender":{"key":"jens.lehmann@web.de","avatar":"https://avatars.githubusercontent.com/u/135220?v=4"},"body":"I'm not against the change per se, but do we really want to risk breaking\nscripts which parse the output of \"git submodule status\" without even\nproviding a commit message explaining why we did that?\n\nAm 29.09.2012 15:43, schrieb Ramkumar Ramachandra:\n> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n> ---\n>  git-submodule.sh |   15 ++++++++-------\n>  1 file changed, 8 insertions(+), 7 deletions(-)\n> \n> diff --git a/git-submodule.sh b/git-submodule.sh\n> index 1d61ebd..f8efc52 100755\n> --- a/git-submodule.sh\n> +++ b/git-submodule.sh\n> @@ -942,27 +942,28 @@ cmd_status()\n>  \t\tname=$(module_name \"$sm_path\") || exit\n>  \t\turl=$(git config submodule.\"$name\".url)\n>  \t\tdisplaypath=\"$prefix$sm_path\"\n> +\t\tsha1_abbr=$(git rev-parse --short \"$sha1\")\n>  \t\tif test \"$stage\" = U\n>  \t\tthen\n> -\t\t\tsay \"U$sha1 $displaypath\"\n> +\t\t\tsay \"U$sha1_abbr $displaypath\"\n>  \t\t\tcontinue\n>  \t\tfi\n>  \t\tif test -z \"$url\" || ! test -d \"$sm_path\"/.git -o -f \"$sm_path\"/.git\n>  \t\tthen\n> -\t\t\tsay \"-$sha1 $displaypath\"\n> +\t\t\tsay \"-$sha1_abbr $displaypath\"\n>  \t\t\tcontinue;\n>  \t\tfi\n> -\t\tset_name_rev \"$sm_path\" \"$sha1\"\n> +\t\tset_name_rev \"$sm_path\" \"$sha1_abbr\"\n>  \t\tif git diff-files --ignore-submodules=dirty --quiet -- \"$sm_path\"\n>  \t\tthen\n> -\t\t\tsay \" $sha1 $displaypath$revname\"\n> +\t\t\tsay \" $sha1_abbr $displaypath$revname\"\n>  \t\telse\n>  \t\t\tif test -z \"$cached\"\n>  \t\t\tthen\n> -\t\t\t\tsha1=$(clear_local_git_env; cd \"$sm_path\" && git rev-parse --verify HEAD)\n> -\t\t\t\tset_name_rev \"$sm_path\" \"$sha1\"\n> +\t\t\t\tsha1_abbr=$(clear_local_git_env; cd \"$sm_path\" && git rev-parse --short --verify HEAD)\n> +\t\t\t\tset_name_rev \"$sm_path\" \"$sha1_abbr\"\n>  \t\t\tfi\n> -\t\t\tsay \"+$sha1 $displaypath$revname\"\n> +\t\t\tsay \"+$sha1_abbr $displaypath$revname\"\n>  \t\tfi\n>  \n>  \t\tif test -n \"$recursive\"\n> \n"},{"id":"200176","messageId":"CALkWK0kzZvPv9jFBF=ibMzcNt-jxq4RFjy7pL173+Y4_S0jhWA@mail.gmail.com","threadId":"31674","inReplyTo":"50670655.3030600@web.de","subject":"Re: [PATCH] submodule: use abbreviated sha1 in 'status' output","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2012-09-29T14:45:42Z","receivedAt":"2012-09-29T14:45:42Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Jens Lehmann wrote:\n> I'm not against the change per se, but do we really want to risk breaking\n> scripts which parse the output of \"git submodule status\" without even\n> providing a commit message explaining why we did that?\n\nOh, I didn't realize that there might be such scripts.  What\njustification do I give in the commit message apart from\nprettification?\n\nRam\n"},{"id":"200177","messageId":"50670A94.2070504@web.de","threadId":"31674","inReplyTo":"1348926195-4788-1-git-send-email-artagnon@gmail.com","subject":"Re: [PATCH] submodule: make 'show' an alias for 'summary'","fromName":"Jens Lehmann","fromEmail":"jens.lehmann@web.de","sentAt":"2012-09-29T14:49:56Z","receivedAt":"2012-09-29T14:49:56Z","isPatch":true,"sender":{"key":"jens.lehmann@web.de","avatar":"https://avatars.githubusercontent.com/u/135220?v=4"},"body":"Am 29.09.2012 15:43, schrieb Ramkumar Ramachandra:\n> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n> ---\n>  Like 'git remote show', 'git stash show'.\n\nI understand the analogy to \"git stash show\" (as that also displays\na diff similar to what \" git submodule summary\" does). But \"git\nremote show\" just displays a list of configured remotes, which is\nsomething different. And the other command with a \"show\" option is\n\"git notes show\", which causes it to display a note. So I think we\nare pretty inconsistent here and I see no advantage of adding such\nan alias for \"git submodule summary\". What am I missing?\n"},{"id":"200178","messageId":"50670E39.8080101@web.de","threadId":"31674","inReplyTo":"CALkWK0kzZvPv9jFBF=ibMzcNt-jxq4RFjy7pL173+Y4_S0jhWA@mail.gmail.com","subject":"Re: [PATCH] submodule: use abbreviated sha1 in 'status' output","fromName":"Jens Lehmann","fromEmail":"jens.lehmann@web.de","sentAt":"2012-09-29T15:05:29Z","receivedAt":"2012-09-29T15:05:29Z","isPatch":true,"sender":{"key":"jens.lehmann@web.de","avatar":"https://avatars.githubusercontent.com/u/135220?v=4"},"body":"Am 29.09.2012 16:45, schrieb Ramkumar Ramachandra:\n> Jens Lehmann wrote:\n>> I'm not against the change per se, but do we really want to risk breaking\n>> scripts which parse the output of \"git submodule status\" without even\n>> providing a commit message explaining why we did that?\n> \n> Oh, I didn't realize that there might be such scripts.  What\n> justification do I give in the commit message apart from\n> prettification?\n\nIs a prettification justification enough to break backwards compatibility\nand to risk breaking scripts and user expectations? I think we must have\na really good reasons to do that, and just making stuff prettier doesn't\ncount for me unless we have a strong user demand for that.\n\nI suspect you got the idea for this patch from Marc's recent comment:\n\nAm 24.09.2012 17:07, schrieb Marc Branchaud:\n> (Honestly, submodule's status sub-command has always felt more like plumbing\n> to me than something a user would work with directly.  Maybe it's just the\n> full-length SHA's that put me off...)\n\nThat is just a single user so far indicating your patch /could/ be an\nimprovement. I think we need quite some more votes on that before we\nshould do a change like this.\n"},{"id":"200179","messageId":"CALkWK0nCahg7165_JuJSj7u0UfYRGZgFjJ6O-o=HCwdsPwU-xg@mail.gmail.com","threadId":"31674","inReplyTo":"50670A94.2070504@web.de","subject":"Re: [PATCH] submodule: make 'show' an alias for 'summary'","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2012-09-29T15:07:33Z","receivedAt":"2012-09-29T15:07:33Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Hi Jens,\n\nJens Lehmann wrote:\n> Am 29.09.2012 15:43, schrieb Ramkumar Ramachandra:\n>> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n>> ---\n>>  Like 'git remote show', 'git stash show'.\n>\n> I understand the analogy to \"git stash show\" (as that also displays\n> a diff similar to what \" git submodule summary\" does). But \"git\n> remote show\" just displays a list of configured remotes, which is\n> something different. And the other command with a \"show\" option is\n> \"git notes show\", which causes it to display a note. So I think we\n> are pretty inconsistent here and I see no advantage of adding such\n> an alias for \"git submodule summary\". What am I missing?\n\nI used submodules for the first time, and expected 'git submodule\nshow' to work.  It may not be 100% consistent with the other commands,\nbut I think the 'summary' is a good match.  Either way, I don't feel\nstrongly about the patch, so feel free to drop it if you think it's\ninappropriate.\n\nRam\n"},{"id":"200180","messageId":"50671364.5030205@web.de","threadId":"31674","inReplyTo":"CALkWK0nCahg7165_JuJSj7u0UfYRGZgFjJ6O-o=HCwdsPwU-xg@mail.gmail.com","subject":"Re: [PATCH] submodule: make 'show' an alias for 'summary'","fromName":"Jens Lehmann","fromEmail":"jens.lehmann@web.de","sentAt":"2012-09-29T15:27:32Z","receivedAt":"2012-09-29T15:27:32Z","isPatch":true,"sender":{"key":"jens.lehmann@web.de","avatar":"https://avatars.githubusercontent.com/u/135220?v=4"},"body":"Am 29.09.2012 17:07, schrieb Ramkumar Ramachandra:\n> Jens Lehmann wrote:\n>> Am 29.09.2012 15:43, schrieb Ramkumar Ramachandra:\n>>> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n>>> ---\n>>>  Like 'git remote show', 'git stash show'.\n>>\n>> I understand the analogy to \"git stash show\" (as that also displays\n>> a diff similar to what \" git submodule summary\" does). But \"git\n>> remote show\" just displays a list of configured remotes, which is\n>> something different. And the other command with a \"show\" option is\n>> \"git notes show\", which causes it to display a note. So I think we\n>> are pretty inconsistent here and I see no advantage of adding such\n>> an alias for \"git submodule summary\". What am I missing?\n> \n> I used submodules for the first time, and expected 'git submodule\n> show' to work.  It may not be 100% consistent with the other commands,\n> but I think the 'summary' is a good match.  Either way, I don't feel\n> strongly about the patch, so feel free to drop it if you think it's\n> inappropriate.\n\nI'm very interested in your feedback as a first time submodule user,\nwhat you wrote above makes sense and explains why you did that patch\n(and it would have been nice to read some of it in the commit message\n;-). What information did you expect to get from a \"git submodule\nshow\" which isn't already provided by \"git status\" and \"git diff\"\n(especially as they give you some information the \"git submodule\"\ncommands don't)?\n"},{"id":"200243","messageId":"CALkWK0mqkWvveA6NX36R0L5tQE_wnRwyFu0LncLY6ORXRK-KYA@mail.gmail.com","threadId":"31674","inReplyTo":"50670E39.8080101@web.de","subject":"Re: [PATCH] submodule: use abbreviated sha1 in 'status' output","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2012-10-01T06:42:30Z","receivedAt":"2012-10-01T06:42:30Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Jens Lehmann wrote:\n> I suspect you got the idea for this patch from Marc's recent comment:\n> [...]\n\nYes, I did.\n\n> That is just a single user so far indicating your patch /could/ be an\n> improvement. I think we need quite some more votes on that before we\n> should do a change like this.\n\nI thought it's a porcelain command like 'git status'- we don't need\nvotes to change the output format of 'git status', do we?\n\nRam\n"},{"id":"200244","messageId":"CALkWK0nRKopT4fm36UVyR4Jy1gfeSY4zGy+-nzxm=H=NGcR=DQ@mail.gmail.com","threadId":"31674","inReplyTo":"50671364.5030205@web.de","subject":"Re: [PATCH] submodule: make 'show' an alias for 'summary'","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2012-10-01T06:45:14Z","receivedAt":"2012-10-01T06:45:14Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Hi Jens,\n\nJens Lehmann wrote:\n> I'm very interested in your feedback as a first time submodule user,\n> what you wrote above makes sense and explains why you did that patch\n> (and it would have been nice to read some of it in the commit message\n> ;-). What information did you expect to get from a \"git submodule\n> show\" which isn't already provided by \"git status\" and \"git diff\"\n> (especially as they give you some information the \"git submodule\"\n> commands don't)?\n\nI expected 'git submodule show' to list all the submodules, and show\nchanges to specific submodules like the 'git submodule summary'\noutput.\n\nRam\n"},{"id":"200269","messageId":"5069D15A.6010105@web.de","threadId":"31674","inReplyTo":"CALkWK0mqkWvveA6NX36R0L5tQE_wnRwyFu0LncLY6ORXRK-KYA@mail.gmail.com","subject":"Re: [PATCH] submodule: use abbreviated sha1 in 'status' output","fromName":"Jens Lehmann","fromEmail":"jens.lehmann@web.de","sentAt":"2012-10-01T17:22:34Z","receivedAt":"2012-10-01T17:22:34Z","isPatch":true,"sender":{"key":"jens.lehmann@web.de","avatar":"https://avatars.githubusercontent.com/u/135220?v=4"},"body":"Am 01.10.2012 08:42, schrieb Ramkumar Ramachandra:\n> Jens Lehmann wrote:\n>> That is just a single user so far indicating your patch /could/ be an\n>> improvement. I think we need quite some more votes on that before we\n>> should do a change like this.\n> \n> I thought it's a porcelain command like 'git status'- we don't need\n> votes to change the output format of 'git status', do we?\n\nSure, we are free to change porcelain output. But that doesn't mean\nwe shouldn't have a good reason to do so, no? And I'm not sure yet\nthat it's worth risking to break scripts and user expectations.\n\nAnd Marc's comment also implies that the status command might not\nbe heavily used (surely I never use it), so maybe we are just\nwasting our time here trying to improve it. And if real users show\ninterest in shortening the hashes, I won't object that change.\n"},{"id":"200270","messageId":"5069D24A.6060101@web.de","threadId":"31674","inReplyTo":"CALkWK0nRKopT4fm36UVyR4Jy1gfeSY4zGy+-nzxm=H=NGcR=DQ@mail.gmail.com","subject":"Re: [PATCH] submodule: make 'show' an alias for 'summary'","fromName":"Jens Lehmann","fromEmail":"jens.lehmann@web.de","sentAt":"2012-10-01T17:26:34Z","receivedAt":"2012-10-01T17:26:34Z","isPatch":true,"sender":{"key":"jens.lehmann@web.de","avatar":"https://avatars.githubusercontent.com/u/135220?v=4"},"body":"Am 01.10.2012 08:45, schrieb Ramkumar Ramachandra:\n> Jens Lehmann wrote:\n>> I'm very interested in your feedback as a first time submodule user,\n>> what you wrote above makes sense and explains why you did that patch\n>> (and it would have been nice to read some of it in the commit message\n>> ;-). What information did you expect to get from a \"git submodule\n>> show\" which isn't already provided by \"git status\" and \"git diff\"\n>> (especially as they give you some information the \"git submodule\"\n>> commands don't)?\n> \n> I expected 'git submodule show' to list all the submodules, and show\n> changes to specific submodules like the 'git submodule summary'\n> output.\n\nOk, but \"git submodule summary\" doesn't list all the submodules,\nonly those with changes. Maybe \"git submodule status\" is closer\nto what you expect (except for the missing changes)?\n\nAnd - apart from the list of all submodules - the changes to them\nare given by \"git status\" and \"git diff --submodule\" too, right?\n(sometimes I forget that \"--submodule\" is not enabled by default,\nas I'm a heavy \"git gui\" user, and that option is used there. We\nmight need a config option to turn that on) Or is there something\nyou are missing from their output?\n\nMe too would expect a show command to show me a list of all the\nsubmodules and maybe some extra information (is it populated or\nnot, does it have its .git directory embedded, does it contain\nchanges). So maybe \"show\" should be a slightly pimped \"status\"?\n"},{"id":"200273","messageId":"CALkWK0mQMe1zfbPNf5prjgTwFtPKJuK=uwxqAqN_Q2=76e-=mA@mail.gmail.com","threadId":"31674","inReplyTo":"5069D24A.6060101@web.de","subject":"Re: [PATCH] submodule: make 'show' an alias for 'summary'","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2012-10-01T17:33:49Z","receivedAt":"2012-10-01T17:33:49Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Hi Jens,\n\nJens Lehmann wrote:\n> Am 01.10.2012 08:45, schrieb Ramkumar Ramachandra:\n>> Jens Lehmann wrote:\n>>> I'm very interested in your feedback as a first time submodule user,\n>>> what you wrote above makes sense and explains why you did that patch\n>>> (and it would have been nice to read some of it in the commit message\n>>> ;-). What information did you expect to get from a \"git submodule\n>>> show\" which isn't already provided by \"git status\" and \"git diff\"\n>>> (especially as they give you some information the \"git submodule\"\n>>> commands don't)?\n>>\n>> I expected 'git submodule show' to list all the submodules, and show\n>> changes to specific submodules like the 'git submodule summary'\n>> output.\n>\n> Ok, but \"git submodule summary\" doesn't list all the submodules,\n> only those with changes. Maybe \"git submodule status\" is closer\n> to what you expect (except for the missing changes)?\n\nYes, \"git submodule status\" with \"git submodule summary\"-style change output.\n\n> And - apart from the list of all submodules - the changes to them\n> are given by \"git status\" and \"git diff --submodule\" too, right?\n\nOh, I didn't know about \"git diff --submodule\" at all.\n\n> (sometimes I forget that \"--submodule\" is not enabled by default,\n> as I'm a heavy \"git gui\" user, and that option is used there. We\n> might need a config option to turn that on)\n\nThat's a good idea.  I'll write a patch tomorrow.\n\n> Me too would expect a show command to show me a list of all the\n> submodules and maybe some extra information (is it populated or\n> not, does it have its .git directory embedded, does it contain\n> changes). So maybe \"show\" should be a slightly pimped \"status\"?\n\nSure.  Do we want to create a new subcommand though?  Aren't \"status\"\nand \"summary\" enough already?\n\nRam\n"},{"id":"200274","messageId":"7vsj9yccoa.fsf@alter.siamese.dyndns.org","threadId":"31674","inReplyTo":"5069D24A.6060101@web.de","subject":"Re: [PATCH] submodule: make 'show' an alias for 'summary'","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-10-01T17:41:41Z","receivedAt":"2012-10-01T17:41:41Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jens Lehmann <Jens.Lehmann@web.de> writes:\n\n> Me too would expect a show command to show me a list of all the\n> submodules and maybe some extra information (is it populated or\n> not, does it have its .git directory embedded, does it contain\n> changes). So maybe \"show\" should be a slightly pimped \"status\"?\n\nWhat's the next inventive way somebody who did not read the\ndocumentation will come up with to spell the subcommand known as\n\"status\"?  \"submodule list\"?\n\nDo we really want 47 different subcommands that give the same output\nor slight variations thereof?\n"},{"id":"200284","messageId":"5069EFAA.4090305@web.de","threadId":"31674","inReplyTo":"CALkWK0mQMe1zfbPNf5prjgTwFtPKJuK=uwxqAqN_Q2=76e-=mA@mail.gmail.com","subject":"Re: [PATCH] submodule: make 'show' an alias for 'summary'","fromName":"Jens Lehmann","fromEmail":"jens.lehmann@web.de","sentAt":"2012-10-01T19:31:54Z","receivedAt":"2012-10-01T19:31:54Z","isPatch":true,"sender":{"key":"jens.lehmann@web.de","avatar":"https://avatars.githubusercontent.com/u/135220?v=4"},"body":"Am 01.10.2012 19:33, schrieb Ramkumar Ramachandra:\n> Jens Lehmann wrote:\n>> Am 01.10.2012 08:45, schrieb Ramkumar Ramachandra:\n>>> Jens Lehmann wrote:\n>>>> I'm very interested in your feedback as a first time submodule user,\n>>>> what you wrote above makes sense and explains why you did that patch\n>>>> (and it would have been nice to read some of it in the commit message\n>>>> ;-). What information did you expect to get from a \"git submodule\n>>>> show\" which isn't already provided by \"git status\" and \"git diff\"\n>>>> (especially as they give you some information the \"git submodule\"\n>>>> commands don't)?\n>>>\n>>> I expected 'git submodule show' to list all the submodules, and show\n>>> changes to specific submodules like the 'git submodule summary'\n>>> output.\n>>\n>> Ok, but \"git submodule summary\" doesn't list all the submodules,\n>> only those with changes. Maybe \"git submodule status\" is closer\n>> to what you expect (except for the missing changes)?\n> \n> Yes, \"git submodule status\" with \"git submodule summary\"-style change output.\n\nSo just aliasing \"show\" to \"summary\" would not have done the trick,\nright? ;-)\n\n>> And - apart from the list of all submodules - the changes to them\n>> are given by \"git status\" and \"git diff --submodule\" too, right?\n> \n> Oh, I didn't know about \"git diff --submodule\" at all.\n> \n>> (sometimes I forget that \"--submodule\" is not enabled by default,\n>> as I'm a heavy \"git gui\" user, and that option is used there. We\n>> might need a config option to turn that on)\n> \n> That's a good idea.  I'll write a patch tomorrow.\n\nCool! I suspect showing the difference in shortlog style is much\nmore useful than seeing the hashes.\n\n>> Me too would expect a show command to show me a list of all the\n>> submodules and maybe some extra information (is it populated or\n>> not, does it have its .git directory embedded, does it contain\n>> changes). So maybe \"show\" should be a slightly pimped \"status\"?\n> \n> Sure.  Do we want to create a new subcommand though?  Aren't \"status\"\n> and \"summary\" enough already?\n\nYes, I don't think we need a new command. Maybe someday we will\nchange \"git submodule status\" to contain less hash and maybe some\nother infos, but we're not there yet.\n"}]}