diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-11-18 15:50:16 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-11-18 15:50:16 -0800 |
commit | e6cb314c087661a535b8873502b6d40cef1bbd57 (patch) | |
tree | b097ca74690e1d6bf8a95b5162eb95ec931ad5ed /git-compat-util.h | |
parent | 41d8a5f0f7db6e1d92f925234eb8c55d2d34a5af (diff) | |
parent | d054680c7d245b71ebba0dd030fd13dce213559a (diff) | |
download | git-e6cb314c087661a535b8873502b6d40cef1bbd57.tar.gz |
Merge branch 'ph/diffopts'
* ph/diffopts:
Reorder diff_opt_parse options more logically per topics.
Make the diff_options bitfields be an unsigned with explicit masks.
Use OPT_BIT in builtin-pack-refs
Use OPT_BIT in builtin-for-each-ref
Use OPT_SET_INT and OPT_BIT in builtin-branch
parse-options new features.
Diffstat (limited to 'git-compat-util.h')
-rw-r--r-- | git-compat-util.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h index ede9408bbd..276a43724d 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -20,6 +20,7 @@ #endif #define MSB(x, bits) ((x) & TYPEOF(x)(~0ULL << (sizeof(x) * 8 - (bits)))) +#define HAS_MULTI_BITS(i) ((i) & ((i) - 1)) /* checks if an integer has more than 1 bit set */ /* Approximation of the length of the decimal representation of this type. */ #define decimal_length(x) ((int)(sizeof(x) * 2.56 + 0.5) + 1) |