Skip to content

Commit

Permalink
update-index: move 'uc' var declaration
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Christian Couder authored and Junio C Hamano committed Jan 25, 2016
1 parent 6d19db1 commit e7c0c53
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions builtin/update-index.c
Original file line number Diff line number Diff line change
Expand Up @@ -1116,8 +1116,6 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
the_index.cache_changed |= SOMETHING_CHANGED;
}
if (untracked_cache > UC_DISABLE) {
struct untracked_cache *uc;

if (untracked_cache < UC_FORCE) {
setup_work_tree();
if (!test_if_untracked_cache_is_supported())
Expand All @@ -1126,7 +1124,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
return 0;
}
if (!the_index.untracked) {
uc = xcalloc(1, sizeof(*uc));
struct untracked_cache *uc = xcalloc(1, sizeof(*uc));
strbuf_init(&uc->ident, 100);
uc->exclude_per_dir = ".gitignore";
/* should be the same flags used by git-status */
Expand Down

0 comments on commit e7c0c53

Please sign in to comment.