Merge branch 'nd/ita-empty-commit'
When new paths were added by "git add -N" to the index, it was enough to circumvent the check by "git commit" to refrain from making an empty commit without "--allow-empty". The same logic prevented "git status" to show such a path as "new file" in the "Changes not staged for commit" section. * nd/ita-empty-commit: commit: don't be fooled by ita entries when creating initial commit commit: fix empty commit creation when there's no changes but ita entries diff: add --ita-[in]visible-in-index diff-lib: allow ita entries treated as "not yet exist in index"
This commit is contained in:
4
diff.c
4
diff.c
@ -3987,6 +3987,10 @@ int diff_opt_parse(struct diff_options *options,
|
||||
return parse_submodule_opt(options, arg);
|
||||
else if (skip_prefix(arg, "--ws-error-highlight=", &arg))
|
||||
return parse_ws_error_highlight_opt(options, arg);
|
||||
else if (!strcmp(arg, "--ita-invisible-in-index"))
|
||||
options->ita_invisible_in_index = 1;
|
||||
else if (!strcmp(arg, "--ita-visible-in-index"))
|
||||
options->ita_invisible_in_index = 0;
|
||||
|
||||
/* misc options */
|
||||
else if (!strcmp(arg, "-z"))
|
||||
|
||||
Reference in New Issue
Block a user