* -1 : has delete * 0 : no change * 1 : some change but no delete */
| 950 | * 1 : some change but no delete |
| 951 | */ |
| 952 | static int wt_status_check_worktree_changes(struct wt_status *s, |
| 953 | int *dirty_submodules) |
| 954 | { |
| 955 | int i; |
| 956 | int changes = 0; |
| 957 | |
| 958 | *dirty_submodules = 0; |
| 959 | |
| 960 | for (i = 0; i < s->change.nr; i++) { |
| 961 | struct wt_status_change_data *d; |
| 962 | d = s->change.items[i].util; |
| 963 | if (!d->worktree_status || |
| 964 | d->worktree_status == DIFF_STATUS_UNMERGED) |
| 965 | continue; |
| 966 | if (!changes) |
| 967 | changes = 1; |
| 968 | if (d->dirty_submodule) |
| 969 | *dirty_submodules = 1; |
| 970 | if (d->worktree_status == DIFF_STATUS_DELETED) |
| 971 | changes = -1; |
| 972 | } |
| 973 | return changes; |
| 974 | } |
| 975 | |
| 976 | static void wt_longstatus_print_changed(struct wt_status *s) |
| 977 | { |
no outgoing calls
no test coverage detected