diff --git a/include/git2/status.h b/include/git2/status.h index 794a629af..858f68841 100644 --- a/include/git2/status.h +++ b/include/git2/status.h @@ -148,6 +148,7 @@ typedef enum { GIT_STATUS_OPT_RENAMES_FROM_REWRITES = (1u << 11), GIT_STATUS_OPT_NO_REFRESH = (1u << 12), GIT_STATUS_OPT_UPDATE_INDEX = (1u << 13), + GIT_STATUS_OPT_INCLUDE_UNREADABLE = (1u << 14), } git_status_opt_t; #define GIT_STATUS_OPT_DEFAULTS \ diff --git a/src/status.c b/src/status.c index 6b8009854..5a592a7c5 100644 --- a/src/status.c +++ b/src/status.c @@ -313,6 +313,8 @@ int git_status_list_new( diffopt.flags = diffopt.flags | GIT_DIFF_IGNORE_SUBMODULES; if ((flags & GIT_STATUS_OPT_UPDATE_INDEX) != 0) diffopt.flags = diffopt.flags | GIT_DIFF_UPDATE_INDEX; + if ((flags & GIT_STATUS_OPT_INCLUDE_UNREADABLE) != 0) + diffopt.flags = diffopt.flags | GIT_DIFF_INCLUDE_UNREADABLE; if ((flags & GIT_STATUS_OPT_RENAMES_FROM_REWRITES) != 0) findopt.flags = findopt.flags |