transport: reformat flag #defines to be more readable
All of the #defines for the TRANSPORT_* flags are hardcoded to be powers of two. This can be error prone when adding a new flag and is difficult to read. Update these defines to instead use a shift operation to generate the flags and reformat them. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
6610af872f
commit
14c01bdbe8
30
transport.h
30
transport.h
|
@ -131,21 +131,21 @@ struct transport {
|
|||
enum transport_family family;
|
||||
};
|
||||
|
||||
#define TRANSPORT_PUSH_ALL 1
|
||||
#define TRANSPORT_PUSH_FORCE 2
|
||||
#define TRANSPORT_PUSH_DRY_RUN 4
|
||||
#define TRANSPORT_PUSH_MIRROR 8
|
||||
#define TRANSPORT_PUSH_PORCELAIN 16
|
||||
#define TRANSPORT_PUSH_SET_UPSTREAM 32
|
||||
#define TRANSPORT_RECURSE_SUBMODULES_CHECK 64
|
||||
#define TRANSPORT_PUSH_PRUNE 128
|
||||
#define TRANSPORT_RECURSE_SUBMODULES_ON_DEMAND 256
|
||||
#define TRANSPORT_PUSH_NO_HOOK 512
|
||||
#define TRANSPORT_PUSH_FOLLOW_TAGS 1024
|
||||
#define TRANSPORT_PUSH_CERT_ALWAYS 2048
|
||||
#define TRANSPORT_PUSH_CERT_IF_ASKED 4096
|
||||
#define TRANSPORT_PUSH_ATOMIC 8192
|
||||
#define TRANSPORT_PUSH_OPTIONS 16384
|
||||
#define TRANSPORT_PUSH_ALL (1<<0)
|
||||
#define TRANSPORT_PUSH_FORCE (1<<1)
|
||||
#define TRANSPORT_PUSH_DRY_RUN (1<<2)
|
||||
#define TRANSPORT_PUSH_MIRROR (1<<3)
|
||||
#define TRANSPORT_PUSH_PORCELAIN (1<<4)
|
||||
#define TRANSPORT_PUSH_SET_UPSTREAM (1<<5)
|
||||
#define TRANSPORT_RECURSE_SUBMODULES_CHECK (1<<6)
|
||||
#define TRANSPORT_PUSH_PRUNE (1<<7)
|
||||
#define TRANSPORT_RECURSE_SUBMODULES_ON_DEMAND (1<<8)
|
||||
#define TRANSPORT_PUSH_NO_HOOK (1<<9)
|
||||
#define TRANSPORT_PUSH_FOLLOW_TAGS (1<<10)
|
||||
#define TRANSPORT_PUSH_CERT_ALWAYS (1<<11)
|
||||
#define TRANSPORT_PUSH_CERT_IF_ASKED (1<<12)
|
||||
#define TRANSPORT_PUSH_ATOMIC (1<<13)
|
||||
#define TRANSPORT_PUSH_OPTIONS (1<<14)
|
||||
|
||||
extern int transport_summary_width(const struct ref *refs);
|
||||
|
||||
|
|
Loading…
Reference in New Issue