Merge branch 'rs/pack-bits-in-object-better'

By renumbering object flag bits, "struct object" managed to lose
bloated inter-field padding.

* rs/pack-bits-in-object-better:
  revision: reallocate TOPO_WALK object flags
This commit is contained in:
Junio C Hamano 2020-07-06 22:09:17 -07:00
commit 480e78595e
2 changed files with 6 additions and 5 deletions

View File

@ -58,7 +58,7 @@ struct object_array {
/*
* object flag allocation:
* revision.h: 0---------10 15 25----28
* revision.h: 0---------10 15 23------26
* fetch-pack.c: 01
* negotiator/default.c: 2--5
* walker.c: 0-2
@ -78,7 +78,7 @@ struct object_array {
* builtin/show-branch.c: 0-------------------------------------------26
* builtin/unpack-objects.c: 2021
*/
#define FLAG_BITS 29
#define FLAG_BITS 28
/*
* The object type is stored in 3 bits.

View File

@ -37,6 +37,10 @@
/* WARNING: This is also used as REACHABLE in commit-graph.c. */
#define PULL_MERGE (1u<<15)
#define TOPO_WALK_EXPLORED (1u<<23)
#define TOPO_WALK_INDEGREE (1u<<24)
/*
* Indicates object was reached by traversal. i.e. not given by user on
* command-line or stdin.
@ -48,9 +52,6 @@
#define TRACK_LINEAR (1u<<26)
#define ALL_REV_FLAGS (((1u<<11)-1) | NOT_USER_GIVEN | TRACK_LINEAR | PULL_MERGE)
#define TOPO_WALK_EXPLORED (1u<<27)
#define TOPO_WALK_INDEGREE (1u<<28)
#define DECORATE_SHORT_REFS 1
#define DECORATE_FULL_REFS 2