Merge branch 'maint'
authorJunio C Hamano <junkio@cox.net>
Tue, 9 Jan 2007 20:04:30 +0000 (12:04 -0800)
committerJunio C Hamano <junkio@cox.net>
Tue, 9 Jan 2007 20:04:30 +0000 (12:04 -0800)
* maint:
Fix "Do not ignore a detected patchfile brokenness."
Do not ignore a detected patchfile brokenness.

1  2 
builtin-apply.c
diff --combined builtin-apply.c
index 1c3583706835339d2f3a0b0a5d3b989aae2a8142,721d011bd05dee0e0f3e86514600b3c919f40b79..38a9fdd80867e4548777887e6f6878b8f408eaa5
@@@ -6,6 -6,7 +6,6 @@@
   * This applies patches on top of some (arbitrary) version of the SCM.
   *
   */
 -#include <fnmatch.h>
  #include "cache.h"
  #include "cache-tree.h"
  #include "quote.h"
@@@ -811,7 -812,8 +811,8 @@@ static int find_header(char *line, unsi
                        struct fragment dummy;
                        if (parse_fragment_header(line, len, &dummy) < 0)
                                continue;
-                       error("patch fragment without header at line %d: %.*s", linenr, (int)len-1, line);
+                       die("patch fragment without header at line %d: %.*s",
+                           linenr, (int)len-1, line);
                }
  
                if (size < len + 6)
@@@ -2118,11 -2120,7 +2119,11 @@@ static void numstat_patch_list(struct p
        for ( ; patch; patch = patch->next) {
                const char *name;
                name = patch->new_name ? patch->new_name : patch->old_name;
 -              printf("%d\t%d\t", patch->lines_added, patch->lines_deleted);
 +              if (patch->is_binary)
 +                      printf("-\t-\t");
 +              else
 +                      printf("%d\t%d\t",
 +                             patch->lines_added, patch->lines_deleted);
                if (line_termination && quote_c_style(name, NULL, NULL, 0))
                        quote_c_style(name, NULL, stdout, 0);
                else