path: root/diff.h
diff options
authorJens Lehmann <>2010-03-08 12:53:19 (GMT)
committerJunio C Hamano <>2010-03-08 23:49:23 (GMT)
commit9297f77e6d350f33de961e149dc33c77e7392db4 (patch)
tree6ef83ac56865487414747ff0756fad64d9b3c7cc /diff.h
parentc7e1a73641e24340bf93f6f1792220fa9154cda3 (diff)
git status: Show detailed dirty status of submodules in long format
Since 1.7.0 there are three reasons a submodule is considered modified against the work tree: It contains new commits, modified content or untracked content. Lets show all reasons in the long format of git status, so the user can better asses the nature of the modification. This change does not affect the short and porcelain formats. Two new members are added to "struct wt_status_change_data" to store the information gathered by run_diff_files(). wt-status.c uses the new flag DIFF_OPT_DIRTY_SUBMODULES to tell diff-lib.c it wants to get detailed dirty information about submodules. A hint line for submodules is printed in the dirty header when dirty submodules are present. Signed-off-by: Jens Lehmann <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'diff.h')
1 files changed, 1 insertions, 0 deletions
diff --git a/diff.h b/diff.h
index 2ef3341..95ed7f8 100644
--- a/diff.h
+++ b/diff.h
@@ -69,6 +69,7 @@ typedef void (*diff_format_fn_t)(struct diff_queue_struct *q,
#define DIFF_OPT_ALLOW_TEXTCONV (1 << 21)
#define DIFF_OPT_SUBMODULE_LOG (1 << 23)
+#define DIFF_OPT_DIRTY_SUBMODULES (1 << 24)
#define DIFF_OPT_TST(opts, flag) ((opts)->flags & DIFF_OPT_##flag)
#define DIFF_OPT_SET(opts, flag) ((opts)->flags |= DIFF_OPT_##flag)