[PATCH 06/24] unpack-trees.c: rename parameter 'the_index'

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

 



As "the_index" is already a global variable, we do not want to confuse
the local variable with the global variable.

Signed-off-by: Stefan Beller <sbeller@xxxxxxxxxx>
---
 unpack-trees.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/unpack-trees.c b/unpack-trees.c
index aa15111fef..3dd8f60fc1 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -1199,7 +1199,7 @@ static int clear_ce_flags(struct cache_entry **cache, int nr,
  * Set/Clear CE_NEW_SKIP_WORKTREE according to $GIT_DIR/info/sparse-checkout
  */
 static void mark_new_skip_worktree(struct exclude_list *el,
-				   struct index_state *the_index,
+				   struct index_state *index,
 				   int select_flag, int skip_wt_flag)
 {
 	int i;
@@ -1208,8 +1208,8 @@ static void mark_new_skip_worktree(struct exclude_list *el,
 	 * 1. Pretend the narrowest worktree: only unmerged entries
 	 * are checked out
 	 */
-	for (i = 0; i < the_index->cache_nr; i++) {
-		struct cache_entry *ce = the_index->cache[i];
+	for (i = 0; i < index->cache_nr; i++) {
+		struct cache_entry *ce = index->cache[i];
 
 		if (select_flag && !(ce->ce_flags & select_flag))
 			continue;
@@ -1224,7 +1224,7 @@ static void mark_new_skip_worktree(struct exclude_list *el,
 	 * 2. Widen worktree according to sparse-checkout file.
 	 * Matched entries will have skip_wt_flag cleared (i.e. "in")
 	 */
-	clear_ce_flags(the_index->cache, the_index->cache_nr,
+	clear_ce_flags(index->cache, index->cache_nr,
 		       select_flag, skip_wt_flag, el);
 }
 
-- 
2.13.0.rc1.39.ga6db8bfa24





[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]