[PATCH 1/7] Make unpack_trees_options bit flags actual bitfields
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Mar 22, 2008, 17:22 UTC
- Message-ID
- <alpine.LFD.1.00.0803221021220.3020@woody.linux-foundation.org>
- In-Reply-To
- <alpine.LFD.1.00.0803220955140.3020@woody.linux-foundation.org>
From: Linus Torvalds <torvalds@woody.linux-foundation.org> Date: Fri, 21 Mar 2008 13:14:47 -0700
Instead of wasting space with whole integers for a single bit.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> ---
This is really unrelated to the rest of the series, except for the fact that it irritated me when I was thinking about the required changes to unpack-trees.
unpack-trees.h | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/unpack-trees.h b/unpack-trees.h index 50453ed..ad8cc65 100644 --- a/unpack-trees.h +++ b/unpack-trees.h @@ -9,16 +9,16 @@ typedef int (*merge_fn_t)(struct cache_entry **src, struct unpack_trees_options *options); struct unpack_trees_options { - int reset; - int merge; - int update; - int index_only; - int nontrivial_merge; - int trivial_merges_only; - int verbose_update; - int aggressive; - int skip_unmerged; - int gently; + unsigned int reset:1, + merge:1, + update:1, + index_only:1, + nontrivial_merge:1, + trivial_merges_only:1, + verbose_update:1, + aggressive:1, + skip_unmerged:1, + gently:1; const char *prefix; int pos; struct dir_struct *dir;
-- 1.5.5.rc0.28.g61a0.dirty