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

[PATCH] Fix the status output when there is nothing to commit.

From
Junio C Hamano <junkio@cox.net>
Date
Aug 26, 2005, 08:04 UTC
Message-ID
<7vek8hgm4p.fsf@assigned-by-dhcp.cox.net>
It had an extra empty '#' line.
Signed-off-by: Junio C Hamano <junkio@cox.net>
---
 git-commit-script |    4 ++--
 git-status-script |    3 +--
 2 files changed, 3 insertions(+), 4 deletions(-)
22758793f9cde4379bacb067e2a4551373eaf073
diff --git a/git-commit-script b/git-commit-script
--- a/git-commit-script
+++ b/git-commit-script
@@ -195,8 +195,8 @@ else
 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
--- a/git-status-script
+++ b/git-status-script
@@ -31,8 +31,7 @@ report () {
 branch=`readlink "$GIT_DIR/HEAD"`
 case "$branch" in
 refs/heads/master) ;;
-*)	echo "#
-# On branch $branch" ;;
+*)	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"
Message 1 of 1 in “Fix the status output when there is nothing to commit.”
  1. Fix the status output when there is nothing to commit.Junio C Hamano, Aug 26, 2005

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.