Skip to content

Commit f8adbec

Browse files
pcloudsgitster
authored andcommitted
cache.h: flip NO_THE_INDEX_COMPATIBILITY_MACROS switch
By default, index compat macros are off from now on, because they could hide the_index dependency. Only those in builtin can use it. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 150fe06 commit f8adbec

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+58
-24
lines changed

attr.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
* an insanely large number of attributes.
88
*/
99

10-
#define NO_THE_INDEX_COMPATIBILITY_MACROS
1110
#include "cache.h"
1211
#include "config.h"
1312
#include "exec-cmd.h"

builtin/add.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
*
44
* Copyright (C) 2006 Linus Torvalds
55
*/
6+
#define USE_THE_INDEX_COMPATIBILITY_MACROS
67
#include "cache.h"
78
#include "config.h"
89
#include "builtin.h"

builtin/am.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
*
44
* Based on git-am.sh by Junio C Hamano.
55
*/
6+
#define USE_THE_INDEX_COMPATIBILITY_MACROS
67
#include "cache.h"
78
#include "config.h"
89
#include "builtin.h"

builtin/blame.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1007,7 +1007,8 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
10071007
long bottom, top;
10081008
if (parse_range_arg(range_list.items[range_i].string,
10091009
nth_line_cb, &sb, lno, anchor,
1010-
&bottom, &top, sb.path, &the_index))
1010+
&bottom, &top, sb.path,
1011+
the_repository->index))
10111012
usage(blame_usage);
10121013
if ((!lno && (top || bottom)) || lno < bottom)
10131014
die(Q_("file %s has only %lu line",

builtin/cat-file.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
*
44
* Copyright (C) Linus Torvalds, 2005
55
*/
6+
#define USE_THE_INDEX_COMPATIBILITY_MACROS
67
#include "cache.h"
78
#include "config.h"
89
#include "builtin.h"

builtin/check-attr.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#define USE_THE_INDEX_COMPATIBILITY_MACROS
12
#include "builtin.h"
23
#include "cache.h"
34
#include "config.h"

builtin/check-ignore.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#define USE_THE_INDEX_COMPATIBILITY_MACROS
12
#include "builtin.h"
23
#include "cache.h"
34
#include "config.h"

builtin/checkout-index.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Copyright (C) 2005 Linus Torvalds
55
*
66
*/
7+
#define USE_THE_INDEX_COMPATIBILITY_MACROS
78
#include "builtin.h"
89
#include "config.h"
910
#include "lockfile.h"

builtin/checkout.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#define USE_THE_INDEX_COMPATIBILITY_MACROS
12
#include "builtin.h"
23
#include "config.h"
34
#include "checkout.h"

builtin/clean.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* Based on git-clean.sh by Pavel Roskin
77
*/
88

9+
#define USE_THE_INDEX_COMPATIBILITY_MACROS
910
#include "builtin.h"
1011
#include "cache.h"
1112
#include "config.h"

0 commit comments

Comments
 (0)