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

[PATCH 2/3] Display some help text when patch is empty

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Jun 1, 2010, 09:20 UTC
Message-ID
<1275384022-12131-3-git-send-email-artagnon@gmail.com>
In-Reply-To
<1275384022-12131-1-git-send-email-artagnon@gmail.com>

When a patch is found to be empty, prompt the user to use either --skip or --abort.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
 git-am.sh |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/git-am.sh b/git-am.sh
index b779277..04f02a8 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -592,6 +592,8 @@ do
 
 		test -s "$dotest/patch" || {
 			echo "Patch is empty.  Was it split wrong?"
+			echo "If you would prefer to skip this patch, instead run \"$cmdline --skip\"."
+			echo "To restore the original branch and stop patching run \"$cmdline --abort\"."
 			stop_here $this
 		}
 		rm -f "$dotest/original-commit"
-- 
1.7.1
Previous: Ramkumar RamachandraNext: Ramkumar Ramachandra
Message 5 of 7 in “Improve git-am error messages”
  1. 0/3 Improve git-am error messagesRamkumar Ramachandra, Jun 1, 2010
  2. 1/3 Set cmdline globally, not in stop_here_user_resolveRamkumar Ramachandra, Jun 1, 2010
  3. Johannes SixtJun 1, 2010
  4. Ramkumar RamachandraJun 1, 2010
  5. 2/3 Display some help text when patch is emptyRamkumar Ramachandra, Jun 1, 2010
  6. 3/3 Remove stray error message from sedRamkumar Ramachandra, Jun 1, 2010
  7. Junio C HamanoJun 1, 2010

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.