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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Symonds
Date: Tuesday, October 28, 2008 - 4:39 pm

Signed-off-by: David Symonds <dsymonds@gmail.com>
---
  This isn't a particularly serious patch, but is very relevant to our
  current discussion at GitTogether '08.

 .gitignore    |    1 +
 Makefile      |    1 +
 git-staged.sh |    8 ++++++++
 3 files changed, 10 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..bfd36e7
--- /dev/null
+++ b/git-staged.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+USAGE=''
+SUBDIRECTORY_OK='Yes'
+OPTIONS_SPEC=
+. git-sh-setup
+
+git diff --cached
-- 
1.6.0

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Implement git-staged, an alias for 'git diff --cac ..., David Symonds, (Tue Oct 28, 4:39 pm)
Re: [PATCH] Implement git-staged, an alias for 'git diff - ..., Johannes Schindelin, (Tue Oct 28, 6:02 pm)
Re: [PATCH] Implement git-staged, an alias for 'git diff - ..., Johannes Schindelin, (Wed Oct 29, 8:08 am)
Re: [PATCH] Implement git-staged, an alias for 'git diff - ..., Johannes Schindelin, (Wed Oct 29, 8:48 am)
Re: [PATCH] Implement git-staged, an alias for 'git diff - ..., Johannes Schindelin, (Wed Oct 29, 10:03 am)
Re: [PATCH] Implement git-staged, an alias for 'git diff - ..., Wincent Colaiuta, (Wed Oct 29, 10:42 am)
Re: [PATCH] Implement git-staged, an alias for 'git diff - ..., Johannes Schindelin, (Wed Oct 29, 12:23 pm)
Re: [PATCH] Implement git-staged, an alias for 'git diff - ..., Wincent Colaiuta, (Wed Oct 29, 12:44 pm)
Re: [PATCH] Implement git-staged, an alias for 'git diff - ..., Felipe Contreras, (Wed Oct 29, 12:49 pm)