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

[PATCH] A test for commit --amend allowing changing of a very empty commit message

From
Alex Riesen <raa.lkml@gmail.com>
Date
Feb 21, 2008, 19:54 UTC
Message-ID
<20080221195438.GA6973@steel.home>
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
Well, it fails... In current master
 t/t7501-commit.sh |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh
index 361886c..f81bf7b 100755
--- a/t/t7501-commit.sh
+++ b/t/t7501-commit.sh
@@ -345,4 +345,14 @@ test_expect_success 'amend using the message from a commit named with tag' '
 
 '
 
+test_expect_success 'allow amend of an empty message' '
+
+	git reset --hard &&
+	sha=$(:|git commit-tree HEAD^{tree} -p HEAD) &&
+	git reset --hard $sha &&
+	git commit --amend -mChanged &&
+	git cat-file commit HEAD|tail -n1|grep ^Changed$
+
+'
+
 test_done
-- 
1.5.4.2.204.g6d0ab
Next: Junio C Hamano
Message 1 of 8 in “A test for commit --amend allowing changing of a very empty commit message”
  1. A test for commit --amend allowing changing of a very empty commit messageAlex Riesen, Feb 21, 2008
  2. Junio C HamanoFeb 21, 2008
  3. Alex RiesenFeb 21, 2008
  4. Fix amending of a commit with an empty messageAlex Riesen, Feb 21, 2008
  5. Junio C HamanoFeb 21, 2008
  6. Alex RiesenFeb 21, 2008
  7. Junio C HamanoFeb 21, 2008
  8. Johannes SchindelinFeb 21, 2008

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.