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

[PATCH 3/3] Remove stray error message from sed

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

When --continue is invoked without any changes, the following stray error message appears- sed: can't read $dotest/final-commit: No such file or directory. Remove this by making sure that the file actually exists.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
 git-am.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-am.sh b/git-am.sh
index 04f02a8..e61f47a 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -693,7 +693,7 @@ do
 	else
 	    action=yes
 	fi
-	FIRSTLINE=$(sed 1q "$dotest/final-commit")
+	test -e "$dotest/final-commit" && FIRSTLINE=$(sed 1q "$dotest/final-commit")
 
 	if test $action = skip
 	then
-- 
1.7.1
Previous: Ramkumar RamachandraNext: Junio C Hamano
Message 6 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.