[PATCH] When exec() fails include the failing command in the error message

Previous thread: Re: git push problem - unpack unpacker exited with error code; ng refs/heads/rel2_branch n/a (unpacker error) by Johannes Schindelin on Tuesday, November 6, 2007 - 3:51 am. (1 message)

Next thread: git-merge ignore specific files by Bill Priest on Tuesday, November 6, 2007 - 5:38 am. (2 messages)
From: Ask Bjørn Hansen
Date: Tuesday, November 6, 2007 - 3:54 am

git-svn occasionally fails with no details as to what went wrong - this should help debug those situations.

Signed-off-by: Ask Bjørn Hansen <ask@develooper.com>
---
 perl/Git.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/perl/Git.pm b/perl/Git.pm
index 3f4080c..dca92c8 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -812,7 +812,7 @@ sub _cmd_exec {
 		$self->wc_subdir() and chdir($self->wc_subdir());
 	}
 	_execv_git_cmd(@args);
-	die "exec failed: $!";
+	die qq[exec "@args" failed: $!];
 }
 
 # Execute the given Git command ($_[0]) with arguments ($_[1..])
-- 
1.5.3.5.561.g140d

-

Previous thread: Re: git push problem - unpack unpacker exited with error code; ng refs/heads/rel2_branch n/a (unpacker error) by Johannes Schindelin on Tuesday, November 6, 2007 - 3:51 am. (1 message)

Next thread: git-merge ignore specific files by Bill Priest on Tuesday, November 6, 2007 - 5:38 am. (2 messages)