cache.h: extract enum declaration from inside a struct declaration
While it is technically possible, it is confusing. Not only the user, but also VS Code's intellisense. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin committed
Jul 30, 2018 at 08:42 UTC
58930fdb195d55d25d84c7d6ba2e2976d78a423d
1 file changed
+13
-11
cache.h
+13
-11
@@ -1362,18 +1362,20 @@ extern void *read_object_with_reference(const struct object_id *oid,
1362
extern struct object *peel_to_type(const char *name, int namelen,
1363
struct object *o, enum object_type);
1364
1365
+enum date_mode_type {
1366
+ DATE_NORMAL = 0,
1367
+ DATE_RELATIVE,
1368
+ DATE_SHORT,
1369
+ DATE_ISO8601,
1370
+ DATE_ISO8601_STRICT,
1371
+ DATE_RFC2822,
1372
+ DATE_STRFTIME,
1373
+ DATE_RAW,
1374
+ DATE_UNIX
1375
+};
1376
+
1377
struct date_mode {
1366
- enum date_mode_type {
1367
- DATE_NORMAL = 0,
1368
- DATE_RELATIVE,
1369
- DATE_SHORT,
1370
- DATE_ISO8601,
1371
- DATE_ISO8601_STRICT,
1372
- DATE_RFC2822,
1373
- DATE_STRFTIME,
1374
- DATE_RAW,
1375
- DATE_UNIX
1376
- } type;
1378
+ enum date_mode_type type;
1379
const char *strftime_fmt;
1380
int local;
1381
};