Commit 33ae8762 by Edward Thomson

patch: identify non-binary patches as `NOT_BINARY`

parent 72827490
...@@ -810,6 +810,8 @@ static int parse_patch_hunks( ...@@ -810,6 +810,8 @@ static int parse_patch_hunks(
goto done; goto done;
} }
patch->base.delta->flags |= GIT_DIFF_FLAG_NOT_BINARY;
done: done:
return error; return error;
} }
...@@ -819,11 +821,8 @@ static int parse_patch_body( ...@@ -819,11 +821,8 @@ static int parse_patch_body(
{ {
if (parse_ctx_contains_s(ctx, "GIT binary patch")) if (parse_ctx_contains_s(ctx, "GIT binary patch"))
return parse_patch_binary(patch, ctx); return parse_patch_binary(patch, ctx);
else
else if (parse_ctx_contains_s(ctx, "@@ -"))
return parse_patch_hunks(patch, ctx); return parse_patch_hunks(patch, ctx);
return 0;
} }
int check_header_names( int check_header_names(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment