From 1ecdecce621009a4d039d061d514056501d0ed8f Mon Sep 17 00:00:00 2001 From: Jeff Hostetler Date: Thu, 11 Aug 2016 10:45:57 -0400 Subject: status: collect per-file data for --porcelain=v2 Collect extra per-file data for porcelain V2 format. The output of `git status --porcelain` leaves out many details about the current status that clients might like to have. This can force them to be less efficient as they may need to launch secondary commands (and try to match the logic within git) to accumulate this extra information. For example, a GUI IDE might want the file mode to display the correct icon for a changed item (without having to stat it afterwards). Signed-off-by: Jeff Hostetler Signed-off-by: Junio C Hamano --- wt-status.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'wt-status.h') diff --git a/wt-status.h b/wt-status.h index 9389076f69..43fd3fccf6 100644 --- a/wt-status.h +++ b/wt-status.h @@ -38,6 +38,9 @@ struct wt_status_change_data { int worktree_status; int index_status; int stagemask; + int score; + int mode_head, mode_index, mode_worktree; + struct object_id oid_head, oid_index; char *head_path; unsigned dirty_submodule : 2; unsigned new_submodule_commits : 1; @@ -48,6 +51,7 @@ enum wt_status_format { STATUS_FORMAT_LONG, STATUS_FORMAT_SHORT, STATUS_FORMAT_PORCELAIN, + STATUS_FORMAT_PORCELAIN_V2, STATUS_FORMAT_UNSPECIFIED }; -- cgit v1.2.3