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

[PATCH v3] send-pack: avoid redundant "pack-objects died with strange error"

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Oct 16, 2010, 17:09 UTC
Message-ID
<20101016170954.GA29619@burratino>
In-Reply-To
<201010161125.33372.j6t@kdbg.org>

Saying "pack-objects died with strange error" after "pack-objects died of signal 13" seems kind of redundant. The latter message was introduced when the run-command API changed to report abnormal exits on behalf of the caller (v1.6.5-rc0~86^2~5, 2009-07-04).

Similarly, after a controlled pack-objects failure (detectable as a normal exit with nonzero status), a "died with strange error" message would be redundant next to the message from pack-objects itself.

So leave off the "strange error" messages.
The result should look something like this:
	$ git push sf master
	Counting objects: 21542, done.
	Compressing objects: 100% (4179/4179), done.
	fatal: Unable to create temporary file: Permission denied
	error: pack-objects died of signal 13
	error: failed to push some refs to 'ssh://sf.net/gitroot/project/project'
	$
Or in the "controlled exit" case (contrived example):
	[...]
	fatal: delta size changed
	error: failed to push some refs to 'ssh://example.com/foo/bar'
	$
Improved-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
On Sat, Oct 16, 2010 at 11:25:33AM +0200, Johannes Sixt wrote:
> On Samstag, 16. Oktober 2010, Jonathan Nieder wrote:
Show 6 quoted lines
>> 	[...]
>> 	error: pack-objects died with status 128
>> 	error: failed to push some refs to 'ssh://example.com/foo/bar'
>
> I sense that this quote is not complete. Did you strip some error message by 
> writing just "[...]"?
That was invented example output.

Googling for "pack-objects died with strange error" gives me [1], with v1.6.2:

	$ git push
	Counting objects: 68, done.
	Delta compression using 2 threads.
	Compressing objects: 100% (50/50), done.
	Connection to SERVER closed by remote host.
	error: pack-objects died with strange error
	error: failed to push some refs to 'SERVER:PROJECT.git'
and [2], with v1.6.4.4:
	Counting objects: 4364, done.
	Delta compression using up to 2 threads.
	Compressing objects: 100% (4240/4240), done.
	error: pack-objects died with strange error | 44 KiB/s   
	error: failed to push some refs to 'mysite:main_site_repo'

and some similar examples. All involve git versions before v1.6.5-rc0~86^2~5 (run_command: report system call errors instead of returning error codes, 2009-07-04) and after a triage turn out to be signals.

Let's go with your fix (thanks!).

[1] http://stackoverflow.com/questions/718962/git-push-error-pack-objects-died-with-strange-error [2] http://stackoverflow.com/questions/1781013/git-error-failed-to-push-some-refs-pack-objects-died-with-strange-error

 builtin/send-pack.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/builtin/send-pack.c b/builtin/send-pack.c
index 481602d..8aa3031 100644
--- a/builtin/send-pack.c
+++ b/builtin/send-pack.c
@@ -101,7 +101,7 @@ static int pack_objects(int fd, struct ref *refs, struct extra_have_objects *ext
 	}
 
 	if (finish_command(&po))
-		return error("pack-objects died with strange error");
+		return -1;
 	return 0;
 }
 
-- 
1.7.2.3
Previous: Johannes SixtNext: Junio C Hamano
Message 9 of 12 in “log which temporary file could not be created”
  1. log which temporary file could not be createdArnout Engelen, Oct 9, 2010
  2. Jonathan NiederOct 10, 2010
  3. Arnout EngelenOct 10, 2010
  4. Jonathan NiederOct 10, 2010
  5. Arnout EngelenOct 10, 2010
  6. send-pack: avoid redundant "pack-objects died with strange error"Jonathan Nieder, Oct 12, 2010
  7. send-pack: avoid redundant "pack-objects died with strange error"Jonathan Nieder, Oct 16, 2010
  8. Johannes SixtOct 16, 2010
  9. send-pack: avoid redundant "pack-objects died with strange error"Jonathan Nieder, Oct 16, 2010
  10. Junio C HamanoOct 12, 2010
  11. Arnout EngelenOct 18, 2010
  12. Arnout EngelenNov 4, 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.