Skip to content

Commit 3b4b8e0

Browse files
committed
builtin/blame.c: constants into bit shift format
We are looking at bitfield constants, and elsewhere in the Git source code, such cases are handled via bit shift operators rather than octal numbers, which also makes it easier to spot holes in the range (if, say, 1<<5 was missing, it is easier to spot it between 1<<4 and 1<<6 than it is to spot a missing 040 between a 020 and a 0100). Signed-off-by: Hariom Verma <[email protected]>
1 parent 08da649 commit 3b4b8e0

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

builtin/blame.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -319,18 +319,18 @@ static const char *format_time(timestamp_t time, const char *tz_str,
319319
return time_buf.buf;
320320
}
321321

322-
#define OUTPUT_ANNOTATE_COMPAT 001
323-
#define OUTPUT_LONG_OBJECT_NAME 002
324-
#define OUTPUT_RAW_TIMESTAMP 004
325-
#define OUTPUT_PORCELAIN 010
326-
#define OUTPUT_SHOW_NAME 020
327-
#define OUTPUT_SHOW_NUMBER 040
328-
#define OUTPUT_SHOW_SCORE 0100
329-
#define OUTPUT_NO_AUTHOR 0200
330-
#define OUTPUT_SHOW_EMAIL 0400
331-
#define OUTPUT_LINE_PORCELAIN 01000
332-
#define OUTPUT_COLOR_LINE 02000
333-
#define OUTPUT_SHOW_AGE_WITH_COLOR 04000
322+
#define OUTPUT_ANNOTATE_COMPAT (1<<0)
323+
#define OUTPUT_LONG_OBJECT_NAME (1<<1)
324+
#define OUTPUT_RAW_TIMESTAMP (1<<2)
325+
#define OUTPUT_PORCELAIN (1<<3)
326+
#define OUTPUT_SHOW_NAME (1<<4)
327+
#define OUTPUT_SHOW_NUMBER (1<<5)
328+
#define OUTPUT_SHOW_SCORE (1<<6)
329+
#define OUTPUT_NO_AUTHOR (1<<7)
330+
#define OUTPUT_SHOW_EMAIL (1<<8)
331+
#define OUTPUT_LINE_PORCELAIN (1<<9)
332+
#define OUTPUT_COLOR_LINE (1<<10)
333+
#define OUTPUT_SHOW_AGE_WITH_COLOR (1<<11)
334334

335335
static void emit_porcelain_details(struct blame_origin *suspect, int repeat)
336336
{

0 commit comments

Comments
 (0)