sha1-file: avoid "sha1 file" for generic use in messages
[gitweb.git] / apply.c
diff --git a/apply.c b/apply.c
index 3746310cefae7ff8127cc033e0c11b3eb43eecd0..b8e257ead24a3fe19b0dc9585f471a70b570730f 100644 (file)
--- a/apply.c
+++ b/apply.c
@@ -1748,7 +1748,7 @@ static int parse_fragment(struct apply_state *state,
        }
        if (oldlines || newlines)
                return -1;
-       if (!deleted && !added)
+       if (!patch->recount && !deleted && !added)
                return -1;
 
        fragment->leading = leading;
@@ -3183,7 +3183,7 @@ static int apply_binary(struct apply_state *state,
                return 0; /* deletion patch */
        }
 
-       if (has_sha1_file(oid.hash)) {
+       if (has_object_file(&oid)) {
                /* We already have the postimage */
                enum object_type type;
                unsigned long size;