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

[PATCH] Implement git-staged, an alias for 'git diff --cached'.

From
David Symonds <dsymonds@gmail.com>
Date
Oct 29, 2008, 00:44 UTC
Message-ID
<1225241048-99267-1-git-send-email-dsymonds@gmail.com>
In-Reply-To
<20081029003931.GA7291@sigill.intra.peff.net>
Signed-off-by: David Symonds <dsymonds@gmail.com>
---
 .gitignore    |    1 +
 Makefile      |    1 +
 git-staged.sh |    2 ++
 3 files changed, 4 insertions(+), 0 deletions(-)
 create mode 100755 git-staged.sh
diff --git a/.gitignore b/.gitignore
index bbaf9de..9353d19 100644
--- a/.gitignore
+++ b/.gitignore
@@ -118,6 +118,7 @@ git-show
 git-show-branch
 git-show-index
 git-show-ref
+git-staged
 git-stash
 git-status
 git-stripspace
diff --git a/Makefile b/Makefile
index d6f3695..1b23e53 100644
--- a/Makefile
+++ b/Makefile
@@ -262,6 +262,7 @@ SCRIPT_SH += git-rebase.sh
 SCRIPT_SH += git-repack.sh
 SCRIPT_SH += git-request-pull.sh
 SCRIPT_SH += git-sh-setup.sh
+SCRIPT_SH += git-staged.sh
 SCRIPT_SH += git-stash.sh
 SCRIPT_SH += git-submodule.sh
 SCRIPT_SH += git-web--browse.sh
diff --git a/git-staged.sh b/git-staged.sh
new file mode 100755
index 0000000..66a5e33
--- /dev/null
+++ b/git-staged.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec git diff --cached "$@"
-- 
1.6.0
Previous: Jeff KingNext: Johannes Schindelin
Message 5 of 25 in “Implement git-staged, an alias for 'git diff --cached'.”
  1. Implement git-staged, an alias for 'git diff --cached'.David Symonds, Oct 28, 2008
  2. Jeff KingOct 28, 2008
  3. Implement git-staged, an alias for 'git diff --cached'.David Symonds, Oct 28, 2008
  4. Jeff KingOct 29, 2008
  5. Implement git-staged, an alias for 'git diff --cached'.David Symonds, Oct 29, 2008
  6. Johannes SchindelinOct 29, 2008
  7. Jeff KingOct 29, 2008
  8. Wincent ColaiutaOct 29, 2008
  9. Johannes SchindelinOct 29, 2008
  10. Stephan BeyerOct 29, 2008
  11. Johannes SchindelinOct 29, 2008
  12. Wincent ColaiutaOct 29, 2008
  13. Johannes SchindelinOct 29, 2008
  14. Pascal ObryOct 29, 2008
  15. Wincent ColaiutaOct 29, 2008
  16. Teemu LikonenOct 29, 2008
  17. David KågedalOct 29, 2008
  18. Johannes SchindelinOct 29, 2008
  19. Wincent ColaiutaOct 29, 2008
  20. Stephan BeyerOct 29, 2008
  21. Jeff KingOct 29, 2008
  22. Brandon CaseyOct 29, 2008
  23. Jeff KingOct 29, 2008
  24. Pascal ObryOct 29, 2008
  25. Felipe ContrerasOct 29, 2008

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.