diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2018-09-21 17:57:37 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-09-21 09:51:18 -0700 |
commit | 26d024ecf0e2e5bd697714b95930bb6008d85f3f (patch) | |
tree | 82e38d7c9aee2bab48766086b40125a6f8d90ef8 /apply.c | |
parent | dcf42869eefe22150a30ed0221e01b701cea1f14 (diff) | |
download | git-26d024ecf0e2e5bd697714b95930bb6008d85f3f.tar.gz |
ws.c: remove implicit dependency on the_index
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'apply.c')
-rw-r--r-- | apply.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -2131,10 +2131,12 @@ static int parse_chunk(struct apply_state *state, char *buffer, unsigned long si if (!use_patch(state, patch)) patch->ws_rule = 0; + else if (patch->new_name) + patch->ws_rule = whitespace_rule(state->repo->index, + patch->new_name); else - patch->ws_rule = whitespace_rule(patch->new_name - ? patch->new_name - : patch->old_name); + patch->ws_rule = whitespace_rule(state->repo->index, + patch->old_name); patchsize = parse_single_patch(state, buffer + offset + hdrsize, |