summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9a9cbb6)
raw | patch | inline | side by side (parent: 9a9cbb6)
author | Junio C Hamano <junkio@cox.net> | |
Fri, 26 Aug 2005 23:53:26 +0000 (16:53 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 28 Aug 2005 19:15:09 +0000 (12:15 -0700) |
When not working on "master" branch, remind the user at the beginning
of the status message, not at the end.
Signed-off-by: Junio C Hamano <junkio@cox.net>
of the status message, not at the end.
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-commit-script | patch | blob | history | |
git-status-script | patch | blob | history |
diff --git a/git-commit-script b/git-commit-script
index e47a090c970f86f9c790deae455b4fcaf51c30f6..4987e37861adac29af5bfd03a8d8e1e6932338e0 100755 (executable)
--- a/git-commit-script
+++ b/git-commit-script
fi
if [ "$?" != "0" -a ! -f $GIT_DIR/MERGE_HEAD ]
then
- sed -ne '/^#/p' .editmsg
- rm .editmsg
+ rm -f .editmsg
+ git-status-script
exit 1
fi
case "$no_edit" in
diff --git a/git-status-script b/git-status-script
index 947cc219752ce3f099ca182e32e684f09ab4c1db..1999a66979ce5444b89c66a3ab7c13dcbf9b64ca 100755 (executable)
--- a/git-status-script
+++ b/git-status-script
[ "$header" ]
}
+branch=`readlink "$GIT_DIR/HEAD"`
+case "$branch" in
+refs/heads/master) ;;
+*) echo "# On branch $branch" ;;
+esac
git-update-cache --refresh >/dev/null 2>&1
git-diff-cache -M --cached HEAD | sed 's/^://' | report "Updated but not checked in" "will commit"
committable="$?"
echo "nothing to commit"
exit 1
fi
-branch=`readlink "$GIT_DIR/HEAD"`
-case "$branch" in
-refs/heads/master) ;;
-*) echo "#
-# On branch $branch" ;;
-esac
exit 0