Skip to content

Commit e7c0c53

Browse files
chriscoolgitster
authored andcommitted
update-index: move 'uc' var declaration
Signed-off-by: Christian Couder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6d19db1 commit e7c0c53

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

builtin/update-index.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,8 +1116,6 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
11161116
the_index.cache_changed |= SOMETHING_CHANGED;
11171117
}
11181118
if (untracked_cache > UC_DISABLE) {
1119-
struct untracked_cache *uc;
1120-
11211119
if (untracked_cache < UC_FORCE) {
11221120
setup_work_tree();
11231121
if (!test_if_untracked_cache_is_supported())
@@ -1126,7 +1124,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
11261124
return 0;
11271125
}
11281126
if (!the_index.untracked) {
1129-
uc = xcalloc(1, sizeof(*uc));
1127+
struct untracked_cache *uc = xcalloc(1, sizeof(*uc));
11301128
strbuf_init(&uc->ident, 100);
11311129
uc->exclude_per_dir = ".gitignore";
11321130
/* should be the same flags used by git-status */

0 commit comments

Comments
 (0)