Skip to content

Commit

Permalink
[GUILT 1/6] Refuse to push corrupt patches
Browse files Browse the repository at this point in the history
"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 <[email protected]>
Signed-off-by: Josef 'Jeff' Sipek <[email protected]>
  • Loading branch information
Alan Jenkins authored and jeffpc committed Mar 13, 2012
1 parent 2da4631 commit 140dab8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion guilt
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,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
Expand Down

0 comments on commit 140dab8

Please sign in to comment.