From: Jeff King Date: Fri, 17 Jan 2014 01:19:46 +0000 (-0500) Subject: diff_filespec: reorder dirty_submodule macro definitions X-Git-Tag: v1.9-rc1~14^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b837f5d68da391f3a54817bb04f1e7ec04f9cdac;p=thirdparty%2Fgit.git diff_filespec: reorder dirty_submodule macro definitions diff_filespec has a 2-bit "dirty_submodule" field and defines two flags as macros. Originally these were right next to each other, but a new field was accidentally added in between in commit 4682d85. This patch puts the field and its flags back together. Using an enum like: enum { DIRTY_SUBMODULE_UNTRACKED = 1, DIRTY_SUBMODULE_MODIFIED = 2 } dirty_submodule; would be more obvious, but it bloats the structure. Limiting the enum size like: } dirty_submodule : 2; might work, but it is not portable. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- diff --git a/diffcore.h b/diffcore.h index 1c16c8595b..f822f9e2b0 100644 --- a/diffcore.h +++ b/diffcore.h @@ -43,9 +43,9 @@ struct diff_filespec { unsigned should_free : 1; /* data should be free()'ed */ unsigned should_munmap : 1; /* data should be munmap()'ed */ unsigned dirty_submodule : 2; /* For submodules: its work tree is dirty */ - unsigned is_stdin : 1; #define DIRTY_SUBMODULE_UNTRACKED 1 #define DIRTY_SUBMODULE_MODIFIED 2 + unsigned is_stdin : 1; unsigned has_more_entries : 1; /* only appear in combined diff */ struct userdiff_driver *driver; /* data should be considered "binary"; -1 means "don't know yet" */