[PATCH 12/12] builtin/*: remove or amend "USE_THE_INDEX_COMPATIBILITY_MACROS"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Follow-up the preceding commit and change
"USE_THE_INDEX_COMPATIBILITY_MACROS" to the more narrow
"USE_THE_INDEX_VARIABLE" in cases where we still use "the_index".

Then remove "USE_THE_INDEX_VARIABLE" entirely in the few cases where
we don't require any compatibility macros or variables anymore.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx>
---
 builtin/add.c            | 2 +-
 builtin/check-attr.c     | 2 +-
 builtin/check-ignore.c   | 2 +-
 builtin/checkout-index.c | 2 +-
 builtin/clean.c          | 2 +-
 builtin/clone.c          | 2 +-
 builtin/describe.c       | 2 +-
 builtin/diff-files.c     | 1 -
 builtin/diff-index.c     | 1 -
 builtin/diff-tree.c      | 2 +-
 builtin/fsck.c           | 2 +-
 builtin/merge-index.c    | 2 +-
 builtin/merge-ours.c     | 1 -
 builtin/rebase.c         | 2 +-
 builtin/reset.c          | 2 +-
 builtin/rev-parse.c      | 2 +-
 16 files changed, 13 insertions(+), 16 deletions(-)

diff --git a/builtin/add.c b/builtin/add.c
index 566c27e5311..76277df326b 100644
--- a/builtin/add.c
+++ b/builtin/add.c
@@ -3,7 +3,7 @@
  *
  * Copyright (C) 2006 Linus Torvalds
  */
-#define USE_THE_INDEX_COMPATIBILITY_MACROS
+#define USE_THE_INDEX_VARIABLE
 #include "cache.h"
 #include "config.h"
 #include "builtin.h"
diff --git a/builtin/check-attr.c b/builtin/check-attr.c
index 2b9271f816c..0fef10eb6bc 100644
--- a/builtin/check-attr.c
+++ b/builtin/check-attr.c
@@ -1,4 +1,4 @@
-#define USE_THE_INDEX_COMPATIBILITY_MACROS
+#define USE_THE_INDEX_VARIABLE
 #include "builtin.h"
 #include "cache.h"
 #include "config.h"
diff --git a/builtin/check-ignore.c b/builtin/check-ignore.c
index 6ebd0169fc8..ab776061c7c 100644
--- a/builtin/check-ignore.c
+++ b/builtin/check-ignore.c
@@ -1,4 +1,4 @@
-#define USE_THE_INDEX_COMPATIBILITY_MACROS
+#define USE_THE_INDEX_VARIABLE
 #include "builtin.h"
 #include "cache.h"
 #include "config.h"
diff --git a/builtin/checkout-index.c b/builtin/checkout-index.c
index 9087005b4fb..cf6fba97ba7 100644
--- a/builtin/checkout-index.c
+++ b/builtin/checkout-index.c
@@ -4,7 +4,7 @@
  * Copyright (C) 2005 Linus Torvalds
  *
  */
-#define USE_THE_INDEX_COMPATIBILITY_MACROS
+#define USE_THE_INDEX_VARIABLE
 #include "builtin.h"
 #include "config.h"
 #include "dir.h"
diff --git a/builtin/clean.c b/builtin/clean.c
index 7bdeb01d30e..b2701a28158 100644
--- a/builtin/clean.c
+++ b/builtin/clean.c
@@ -6,7 +6,7 @@
  * Based on git-clean.sh by Pavel Roskin
  */
 
-#define USE_THE_INDEX_COMPATIBILITY_MACROS
+#define USE_THE_INDEX_VARIABLE
 #include "builtin.h"
 #include "cache.h"
 #include "config.h"
diff --git a/builtin/clone.c b/builtin/clone.c
index 8ab0453a292..f518bb2dc1f 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -8,7 +8,7 @@
  * Clone a repository into a different directory that does not yet exist.
  */
 
-#define USE_THE_INDEX_COMPATIBILITY_MACROS
+#define USE_THE_INDEX_VARIABLE
 #include "builtin.h"
 #include "config.h"
 #include "lockfile.h"
diff --git a/builtin/describe.c b/builtin/describe.c
index 4f4a58eef2b..eea1e330c00 100644
--- a/builtin/describe.c
+++ b/builtin/describe.c
@@ -1,4 +1,4 @@
-#define USE_THE_INDEX_COMPATIBILITY_MACROS
+#define USE_THE_INDEX_VARIABLE
 #include "cache.h"
 #include "config.h"
 #include "lockfile.h"
diff --git a/builtin/diff-files.c b/builtin/diff-files.c
index 1f3deb13c28..b1e1cef7a76 100644
--- a/builtin/diff-files.c
+++ b/builtin/diff-files.c
@@ -3,7 +3,6 @@
  *
  * Copyright (C) Linus Torvalds, 2005
  */
-#define USE_THE_INDEX_COMPATIBILITY_MACROS
 #include "cache.h"
 #include "config.h"
 #include "diff.h"
diff --git a/builtin/diff-index.c b/builtin/diff-index.c
index a178e774a5a..91ad56af177 100644
--- a/builtin/diff-index.c
+++ b/builtin/diff-index.c
@@ -1,4 +1,3 @@
-#define USE_THE_INDEX_COMPATIBILITY_MACROS
 #include "cache.h"
 #include "config.h"
 #include "diff.h"
diff --git a/builtin/diff-tree.c b/builtin/diff-tree.c
index a724087261d..25b853b85ca 100644
--- a/builtin/diff-tree.c
+++ b/builtin/diff-tree.c
@@ -1,4 +1,4 @@
-#define USE_THE_INDEX_COMPATIBILITY_MACROS
+#define USE_THE_INDEX_VARIABLE
 #include "cache.h"
 #include "config.h"
 #include "diff.h"
diff --git a/builtin/fsck.c b/builtin/fsck.c
index d6f9a31e216..d207bd909b4 100644
--- a/builtin/fsck.c
+++ b/builtin/fsck.c
@@ -1,4 +1,4 @@
-#define USE_THE_INDEX_COMPATIBILITY_MACROS
+#define USE_THE_INDEX_VARIABLE
 #include "builtin.h"
 #include "cache.h"
 #include "repository.h"
diff --git a/builtin/merge-index.c b/builtin/merge-index.c
index b1d98294cdd..452f833ac46 100644
--- a/builtin/merge-index.c
+++ b/builtin/merge-index.c
@@ -1,4 +1,4 @@
-#define USE_THE_INDEX_COMPATIBILITY_MACROS
+#define USE_THE_INDEX_VARIABLE
 #include "builtin.h"
 #include "run-command.h"
 
diff --git a/builtin/merge-ours.c b/builtin/merge-ours.c
index 5d95acf52a6..284eb486098 100644
--- a/builtin/merge-ours.c
+++ b/builtin/merge-ours.c
@@ -7,7 +7,6 @@
  *
  * Pretend we resolved the heads, but declare our tree trumps everybody else.
  */
-#define USE_THE_INDEX_COMPATIBILITY_MACROS
 #include "git-compat-util.h"
 #include "builtin.h"
 #include "diff.h"
diff --git a/builtin/rebase.c b/builtin/rebase.c
index 345a55755a3..1384008fe09 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -4,7 +4,7 @@
  * Copyright (c) 2018 Pratik Karki
  */
 
-#define USE_THE_INDEX_COMPATIBILITY_MACROS
+#define USE_THE_INDEX_VARIABLE
 #include "builtin.h"
 #include "run-command.h"
 #include "exec-cmd.h"
diff --git a/builtin/reset.c b/builtin/reset.c
index 5ab03e9616a..52a1a9bd513 100644
--- a/builtin/reset.c
+++ b/builtin/reset.c
@@ -7,7 +7,7 @@
  *
  * Copyright (c) 2005, 2006 Linus Torvalds and Junio C Hamano
  */
-#define USE_THE_INDEX_COMPATIBILITY_MACROS
+#define USE_THE_INDEX_VARIABLE
 #include "builtin.h"
 #include "config.h"
 #include "lockfile.h"
diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c
index bffdd27bd7e..d4c81352a65 100644
--- a/builtin/rev-parse.c
+++ b/builtin/rev-parse.c
@@ -3,7 +3,7 @@
  *
  * Copyright (C) Linus Torvalds, 2005
  */
-#define USE_THE_INDEX_COMPATIBILITY_MACROS
+#define USE_THE_INDEX_VARIABLE
 #include "cache.h"
 #include "config.h"
 #include "commit.h"
-- 
2.38.0.1511.gcdcff1f1dc2




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux