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:
3
diff.h
3
diff.h
@ -146,6 +146,7 @@ struct diff_options {
|
||||
int dirstat_permille;
|
||||
int setup;
|
||||
int abbrev;
|
||||
int ita_invisible_in_index;
|
||||
/* white-space error highlighting */
|
||||
#define WSEH_NEW 1
|
||||
#define WSEH_CONTEXT 2
|
||||
@ -360,7 +361,7 @@ extern int diff_result_code(struct diff_options *, int);
|
||||
|
||||
extern void diff_no_index(struct rev_info *, int, const char **);
|
||||
|
||||
extern int index_differs_from(const char *def, int diff_flags);
|
||||
extern int index_differs_from(const char *def, int diff_flags, int ita_invisible_in_index);
|
||||
|
||||
/*
|
||||
* Fill the contents of the filespec "df", respecting any textconv defined by
|
||||
|
Reference in New Issue
Block a user