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

Function fix_unmerged_status

read-cache.c:3888–3907  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3886};
3887
3888static int fix_unmerged_status(struct diff_filepair *p,
3889 struct update_callback_data *data)
3890{
3891 if (p->status != DIFF_STATUS_UNMERGED)
3892 return p->status;
3893 if (!(data->flags & ADD_CACHE_IGNORE_REMOVAL) && !p->two->mode)
3894 /*
3895 * This is not an explicit add request, and the
3896 * path is missing from the working tree (deleted)
3897 */
3898 return DIFF_STATUS_DELETED;
3899 else
3900 /*
3901 * Either an explicit add request, or path exists
3902 * in the working tree. An attempt to explicitly
3903 * add a path that does not exist in the working tree
3904 * will be caught as an error by the caller immediately.
3905 */
3906 return DIFF_STATUS_MODIFIED;
3907}
3908
3909static int skip_submodule(const char *path,
3910 struct repository *repo,

Callers 1

update_callbackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected