git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GUILT 1/6] Refuse to push corrupt patches
@ 2011-09-28 14:15 Alan Jenkins
  2011-09-28 14:15 ` [GUILT 2/6] guilt-header: fix patch corruption Alan Jenkins
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Alan Jenkins @ 2011-09-28 14:15 UTC (permalink / raw)
  To: jeffpc; +Cc: git, Alan Jenkins

"guilt push" would treat corrupt patches as empty,
because "git apply --numstat" prints nothing on stdout.

(You do get an error message on stderr,
 but then guilt says "Patch applied" etc,
 and I didn't notice the earlier error message
 for quite some time.)

Signed-off-by: Alan Jenkins <alan.christopher.jenkins@googlemail.com>
---
 guilt |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/guilt b/guilt
index d1e17d4..51532f9 100755
--- a/guilt
+++ b/guilt
@@ -611,7 +611,7 @@ push_patch()
 		cd_to_toplevel
 
 		# apply the patch if and only if there is something to apply
-		if [ `git apply --numstat "$p" | wc -l` -gt 0 ]; then
+		if [ `do_get_patch "$p" | wc -l` -gt 0 ]; then
 			if [ "$bail_action" = abort ]; then
 				reject=""
 			fi
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-09-30 17:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-28 14:15 [GUILT 1/6] Refuse to push corrupt patches Alan Jenkins
2011-09-28 14:15 ` [GUILT 2/6] guilt-header: fix patch corruption Alan Jenkins
2011-09-28 14:15 ` [GUILT 3/6] Handle paths that contain spaces Alan Jenkins
2011-09-28 14:15 ` [GUILT 4/6] Run regression tests in a directory which contains spaces Alan Jenkins
2011-09-28 14:15 ` [GUILT 5/6] Allow guilt scripts to be run from " Alan Jenkins
2011-09-28 14:15 ` [GUILT 6/6] Allow the regression tests to be run from a directory with spaces in Alan Jenkins
2011-09-30 17:15 ` [GUILT 1/6] Refuse to push corrupt patches Josef 'Jeff' Sipek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).