summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7e011c4)
raw | patch | inline | side by side (parent: 7e011c4)
author | Junio C Hamano <junkio@cox.net> | |
Thu, 1 Sep 2005 00:15:25 +0000 (17:15 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 1 Sep 2005 00:15:25 +0000 (17:15 -0700) |
Update 'git commit' to use the updated `git status`. Also earlier
the `-s` flag was ignored for the initial commit.
Signed-off-by: Junio C Hamano <junkio@cox.net>
the `-s` flag was ignored for the initial commit.
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-commit-script | patch | blob | history |
diff --git a/git-commit-script b/git-commit-script
index cd28dde64d2addb0c6df7007232778a84ea88e08..a2455b0f8ff1582248b0678b9c85b2f064d972c4 100755 (executable)
--- a/git-commit-script
+++ b/git-commit-script
fi
esac
-if [ ! -r "$GIT_DIR/HEAD" ]
-then
- echo "#"
- echo "# Initial commit"
- echo "#"
- git-ls-files | sed 's/^/# New file: /'
- echo "#"
-elif [ -f "$GIT_DIR/MERGE_HEAD" ]; then
- echo "#"
- echo "# It looks like your may be committing a MERGE."
- echo "# If this is not correct, please remove the file"
- echo "# $GIT_DIR/MERGE_HEAD"
- echo "# and try again"
- echo "#"
-fi >.editmsg
if test "$log_message" != ''
then
echo "$log_message"
elif test "$use_commit" != ""
then
git-cat-file commit "$use_commit" | sed -e '1,/^$/d'
-fi | git-stripspace >>.editmsg
+fi | git-stripspace >.editmsg
+
+case "$signoff" in
+t)
+ git-var GIT_COMMITTER_IDENT | sed -e '
+ s/>.*/>/
+ s/^/Signed-off-by: /
+ ' >>.editmsg
+ ;;
+esac
+
+if [ -f "$GIT_DIR/MERGE_HEAD" ]; then
+ echo "#"
+ echo "# It looks like your may be committing a MERGE."
+ echo "# If this is not correct, please remove the file"
+ echo "# $GIT_DIR/MERGE_HEAD"
+ echo "# and try again"
+ echo "#"
+fi >>.editmsg
PARENTS="-p HEAD"
if [ ! -r "$GIT_DIR/HEAD" ]; then
export GIT_AUTHOR_EMAIL
export GIT_AUTHOR_DATE
fi
- case "$signoff" in
- t)
- git-var GIT_COMMITTER_IDENT | sed -e '
- s/>.*/>/
- s/^/Signed-off-by: /
- ' >>.editmsg
- ;;
- esac
- git-status-script >>.editmsg
fi
+git-status-script >>.editmsg
if [ "$?" != "0" -a ! -f $GIT_DIR/MERGE_HEAD ]
then
rm -f .editmsg