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

Function prepare_symlink_changes

apply.c:3975–3987  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3973}
3974
3975static void prepare_symlink_changes(struct apply_state *state, struct patch *patch)
3976{
3977 for ( ; patch; patch = patch->next) {
3978 if ((patch->old_name && S_ISLNK(patch->old_mode)) &&
3979 (patch->is_rename || patch->is_delete))
3980 /* the symlink at patch->old_name is removed */
3981 strset_add(&state->removed_symlinks, patch->old_name);
3982
3983 if (patch->new_name && S_ISLNK(patch->new_mode))
3984 /* the symlink at patch->new_name is created or remains */
3985 strset_add(&state->kept_symlinks, patch->new_name);
3986 }
3987}
3988
3989static int path_is_beyond_symlink_1(struct apply_state *state, struct strbuf *name)
3990{

Callers 1

check_patch_listFunction · 0.85

Calls 1

strset_addFunction · 0.85

Tested by

no test coverage detected