Unbreak previous for git diffs that do not have the a/ prefix.
authorflorian <florian@openbsd.org>
Tue, 30 May 2017 06:55:40 +0000 (06:55 +0000)
committerflorian <florian@openbsd.org>
Tue, 30 May 2017 06:55:40 +0000 (06:55 +0000)
Found the hard way be me, OK tedu

usr.bin/patch/pch.c

index 4cd2073..cc9047c 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: pch.c,v 1.57 2017/05/26 20:27:02 tedu Exp $   */
+/*     $OpenBSD: pch.c,v 1.58 2017/05/30 06:55:40 florian Exp $        */
 
 /*
  * patch - a program to apply diffs to original files
@@ -327,7 +327,7 @@ intuit_diff_type(void)
                                free(revision);
                                revision = NULL;
                        }
-               } else if (strnEQ(s, "diff --git ", 11))
+               } else if (strnEQ(s, "diff --git a/", 13))
                        piece_of_git = 1;
                if ((!diff_type || diff_type == ED_DIFF) &&
                    first_command_line >= 0 &&