git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] submodule: make 'show' an alias for 'summary'

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Sep 29, 2012, 13:43 UTC
Message-ID
<1348926195-4788-1-git-send-email-artagnon@gmail.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
 Like 'git remote show', 'git stash show'.
 Documentation/git-submodule.txt |    3 ++-
 git-submodule.sh                |    9 ++++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt
index fbbbcb2..498bb5c 100644
--- a/Documentation/git-submodule.txt
+++ b/Documentation/git-submodule.txt
@@ -15,7 +15,7 @@ SYNOPSIS
 'git submodule' [--quiet] init [--] [<path>...]
 'git submodule' [--quiet] update [--init] [-N|--no-fetch] [--rebase]
 	      [--reference <repository>] [--merge] [--recursive] [--] [<path>...]
-'git submodule' [--quiet] summary [--cached|--files] [(-n|--summary-limit) <n>]
+'git submodule' [--quiet] summary|show [--cached|--files] [(-n|--summary-limit) <n>]
 	      [commit] [--] [<path>...]
 'git submodule' [--quiet] foreach [--recursive] <command>
 'git submodule' [--quiet] sync [--] [<path>...]
@@ -151,6 +151,7 @@ If `--recursive` is specified, this command will recurse into the
 registered submodules, and update any nested submodules within.
 
 summary::
+show::
 	Show commit summary between the given commit (defaults to HEAD) and
 	working tree/index. For a submodule in question, a series of commits
 	in the submodule between the given super project commit and the
diff --git a/git-submodule.sh b/git-submodule.sh
index 9210f3a..1d61ebd 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -889,6 +889,13 @@ cmd_summary() {
 	fi
 }
 #
+# Alias for cmd_summary
+#
+cmd_show()
+{
+    cmd_summary "$@"
+}
+#
 # List all submodules, prefixed with:
 #  - submodule not initialized
 #  + different revision checked out
@@ -1049,7 +1056,7 @@ cmd_sync()
 while test $# != 0 && test -z "$command"
 do
 	case "$1" in
-	add | foreach | init | update | status | summary | sync)
+	add | foreach | init | update | status | summary | show | sync)
 		command=$1
 		;;
 	-q|--quiet)
-- 
1.7.10.4
Next: Ramkumar Ramachandra
Message 1 of 15 in “submodule: make 'show' an alias for 'summary'”
  1. submodule: make 'show' an alias for 'summary'Ramkumar Ramachandra, Sep 29, 2012
  2. submodule: use abbreviated sha1 in 'status' outputRamkumar Ramachandra, Sep 29, 2012
  3. Jens LehmannSep 29, 2012
  4. Ramkumar RamachandraSep 29, 2012
  5. Jens LehmannSep 29, 2012
  6. Ramkumar RamachandraOct 1, 2012
  7. Jens LehmannOct 1, 2012
  8. Jens LehmannSep 29, 2012
  9. Ramkumar RamachandraSep 29, 2012
  10. Jens LehmannSep 29, 2012
  11. Ramkumar RamachandraOct 1, 2012
  12. Jens LehmannOct 1, 2012
  13. Ramkumar RamachandraOct 1, 2012
  14. Jens LehmannOct 1, 2012
  15. Junio C HamanoOct 1, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.