Skip to content

Commit bd6a3fd

Browse files
derrickstoleegitster
authored andcommitted
unpack-trees: rename unpack_nondirectories()
In the next change, we will use this method to unpack a sparse directory entry, so change the name to unpack_single_entry() so these entries apply. The new name reflects that we will not recurse into trees in order to resolve the conflicts. Reviewed-by: Elijah Newren <[email protected]> Signed-off-by: Derrick Stolee <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent cd807a5 commit bd6a3fd

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

unpack-trees.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ static int traverse_by_cache_tree(int pos, int nr_entries, int nr_names,
804804
BUG("We need cache-tree to do this optimization");
805805

806806
/*
807-
* Do what unpack_callback() and unpack_nondirectories() normally
807+
* Do what unpack_callback() and unpack_single_entry() normally
808808
* do. But we walk all paths in an iterative loop instead.
809809
*
810810
* D/F conflicts and higher stage entries are not a concern
@@ -1075,11 +1075,11 @@ static struct cache_entry *create_ce_entry(const struct traverse_info *info,
10751075
* without actually calling it. If you change the logic here you may need to
10761076
* check and change there as well.
10771077
*/
1078-
static int unpack_nondirectories(int n, unsigned long mask,
1079-
unsigned long dirmask,
1080-
struct cache_entry **src,
1081-
const struct name_entry *names,
1082-
const struct traverse_info *info)
1078+
static int unpack_single_entry(int n, unsigned long mask,
1079+
unsigned long dirmask,
1080+
struct cache_entry **src,
1081+
const struct name_entry *names,
1082+
const struct traverse_info *info)
10831083
{
10841084
int i;
10851085
struct unpack_trees_options *o = info->data;
@@ -1322,7 +1322,7 @@ static int unpack_callback(int n, unsigned long mask, unsigned long dirmask, str
13221322
}
13231323
}
13241324

1325-
if (unpack_nondirectories(n, mask, dirmask, src, names, info) < 0)
1325+
if (unpack_single_entry(n, mask, dirmask, src, names, info) < 0)
13261326
return -1;
13271327

13281328
if (o->merge && src[0]) {

0 commit comments

Comments
 (0)