path: root/Makefile
diff options
authorJunio C Hamano <>2006-02-10 08:45:59 (GMT)
committerJunio C Hamano <>2006-02-10 08:54:49 (GMT)
commitcf7bb589af739563c90dc32b4901bea73aaaa9d0 (patch)
treea563b00d8ca1acf56262ffa972d4b8155f1e5bfe /Makefile
parent4dc870d90cf4cd30b30b59054603fbb09dca1f41 (diff)
git-status -v
This revamps the git-status command to take the same set of parameters as git commit. It gives a preview of what is being committed with that command. With -v flag, it shows the diff output between the HEAD commit and the index that would be committed if these flags were given to git-commit command. git-commit also acquires -v flag (it used to mean "verify" but that is the default anyway and there is --no-verify to turn it off, so not much is lost), which uses the updated git-status -v to seed the commit log buffer. This is handy for writing a log message while reviewing the changes one last time. Now, git-commit and git-status are internally share the same implementation. Unlike previous git-commit change, this uses a temporary index to prepare the index file that would become the real index file after a successful commit, and moves it to the real index file once the commit is actually made. This makes it safer than the previous scheme, which stashed away the original index file and restored it after an aborted commit. Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'Makefile')
1 files changed, 5 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 5c32934..f240e45 100644
--- a/Makefile
+++ b/Makefile
@@ -107,7 +107,7 @@ SCRIPT_SH = \ \ \ \
- \
+ \ \ \ \
@@ -125,7 +125,7 @@ SCRIPT_PYTHON = \
SCRIPTS = $(patsubst,%,$(SCRIPT_SH)) \
$(patsubst %.perl,%,$(SCRIPT_PERL)) \
$(patsubst,%,$(SCRIPT_PYTHON)) \
- git-cherry-pick git-show
+ git-cherry-pick git-show git-status
# The ones that do not have to link with lcrypto nor lz.
@@ -443,6 +443,9 @@ git-cherry-pick: git-revert
git-show: git-whatchanged
cp $< $@
+git-status: git-commit
+ cp $< $@
# These can record GIT_VERSION
git$X git.spec \
$(patsubst,%,$(SCRIPT_SH)) \