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

Re: fatal: git-write-tree: not able to write tree

From
Ccolin@horizon.com <colin@horizon.com>
Date
Apr 29, 2006, 13:23 UTC
Message-ID
<20060429132324.31638.qmail@science.horizon.com>
diff --git a/git-am.sh b/git-am.sh
index eab4aa8..872145b 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -376,6 +376,13 @@ do
 			echo "No changes - did you forget update-index?"
 			stop_here $this
 		fi
+		unmerged=$(git-ls-files -u)
+		if test -n "$unmerged"
+		then
+			echo "You still have unmerged paths in your index"
+			echo "did you forget update-index?"
+			stop_here $this
+		fi
 		apply_status=0
 		;;
 	esac

Er... it's very non-obvious to me why you'd want to stick a workaround
here when you could instead fix git-write-tree to do it.  That seems
like The Right Thing.
(It would also be helpful to mention at least one unmerged file by name.)
Next: Junio C Hamano
Message 1 of 2 in “Re: fatal: git-write-tree: not able to write tree”
  1. colin@horizon.comApr 29, 2006
  2. Junio C HamanoApr 29, 2006

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.