MCPcopy Create free account
hub / github.com/git/git / gitdiff_newfile

Function gitdiff_newfile

apply.c:1037–1045  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1035}
1036
1037static int gitdiff_newfile(struct gitdiff_data *state,
1038 const char *line,
1039 struct patch *patch)
1040{
1041 patch->is_new = 1;
1042 free(patch->new_name);
1043 patch->new_name = xstrdup_or_null(patch->def_name);
1044 return gitdiff_newmode(state, line, patch);
1045}
1046
1047static int gitdiff_copysrc(struct gitdiff_data *state,
1048 const char *line,

Callers

nothing calls this directly

Calls 2

xstrdup_or_nullFunction · 0.85
gitdiff_newmodeFunction · 0.85

Tested by

no test coverage detected